From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <3RrWgXggKCi8RacZNTOLRZZRWP.NZXWTMLMTRLTWdZfcNPhLcP.ZcR@flex--gprocida.bounces.google.com> Received: from mail-wr1-x449.google.com (mail-wr1-x449.google.com [IPv6:2a00:1450:4864:20::449]) by sourceware.org (Postfix) with ESMTPS id B43D2385DC1F for ; Wed, 22 Apr 2020 21:21:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org B43D2385DC1F Received: by mail-wr1-x449.google.com with SMTP id j16so1699945wrw.20 for ; Wed, 22 Apr 2020 14:21:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=T1TkBppTfOtvq0N93zjSmH6/xyW83JVla3DfbN25d/0=; b=D6Ju/gj+Jd9nbDC44gvMAG4O8uVqDcBagD1meKC3IKL19rbuappJb5u7NoOEXuPzOD v50+iMS7DiTH3ANk6XjT95fdmfvjTtF8C6XND9+7UaBGTq+FQ4I37cTO0SS+wQyodsw9 Wx/9tIvymJcCRXXHyMhRUZm65oHzNQBY8DD+L0NGEyeB36+H4ZZCGOPivs2KwqPrrfK/ ZD/sNpD7CzwCwxeJXj/oqWMcbopnc7Eht3aac8dyP7iruR3LedQT1vizrDzeXLa9mz2v P+X9smKbsmOMPkqXVNXrHxg1RAgGfIXD/ZEAskDkiMA5UXoUA0FGpICLJ6UTs0QFihTt vuPw== X-Gm-Message-State: AGi0PuaGFQs8ax/diALw5ArR+vvTr7VJTxyr5iokD9ePP8tlB4lsSbzd mi/h/VPWDUa8DWR2D/Q4ziSCrdMKj4Yf7EnOZ3UCuSSYjKbz6VJHPr4A2ppAZI+OlXAN0NGBdNH Qhma+sFD7JvsnKPcy6jpUD/O/T0vmEoVC3deXL4q4K5xtyhyPfqdbrwDR57SIq6tOlQoFUsI= X-Google-Smtp-Source: APiQypIVY1tpjpbk+jpWWw1sVYMkCca77mI282hOWgOQ25nung/66LaHvdZeMN8liLxi/EyGKFnqEbX0TfYxew== X-Received: by 2002:adf:dd4c:: with SMTP id u12mr1055176wrm.395.1587590470633; Wed, 22 Apr 2020 14:21:10 -0700 (PDT) Date: Wed, 22 Apr 2020 22:20:58 +0100 In-Reply-To: <20200422212059.258602-1-gprocida@google.com> Message-Id: <20200422212059.258602-2-gprocida@google.com> Mime-Version: 1.0 References: <20200422212059.258602-1-gprocida@google.com> X-Mailer: git-send-email 2.26.1.301.g55bc3eb7cb9-goog Subject: [PATCH 2/3] abidiff: Blank line after declaration-only diff. From: Giuliano Procida To: libabigail@sourceware.org Cc: dodji@seketeli.org, kernel-team@android.com, gprocida@google.com Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-33.9 required=5.0 tests=BAYES_00, DKIMWL_WL_MED, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libabigail@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libabigail mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2020 21:21:13 -0000 In the case where a type change is summarised as declaration-only to defined or vice versa, the trailing new line was missing. * src/abg-default-reporter.cc (default_reporter::report): In the class_or_union_diff overload, emit a new line at the end of the declaration-only reporting path. * tests/data/test-abidiff-exit/test-decl-struct-report.txt: Add missing blank lines. Signed-off-by: Giuliano Procida --- src/abg-default-reporter.cc | 2 +- tests/data/test-abidiff-exit/test-decl-struct-report.txt | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/abg-default-reporter.cc b/src/abg-default-reporter.cc index ff7ed67e..04e2bb76 100644 --- a/src/abg-default-reporter.cc +++ b/src/abg-default-reporter.cc @@ -859,7 +859,7 @@ default_reporter::report(const class_or_union_diff& d, : " and is now a defined type"; out << indent << "type " << first->get_pretty_representation() - << was << is_now; + << was << is_now << "\n"; return; } diff --git a/tests/data/test-abidiff-exit/test-decl-struct-report.txt b/tests/data/test-abidiff-exit/test-decl-struct-report.txt index aa5dedae..8bb712e6 100644 --- a/tests/data/test-abidiff-exit/test-decl-struct-report.txt +++ b/tests/data/test-abidiff-exit/test-decl-struct-report.txt @@ -9,9 +9,11 @@ Variables changes summary: 0 Removed, 0 Changed, 0 Added variable in unqualified underlying type 'struct embodied' at test-decl-struct-v1.c:1:1: type size changed from 0 to 32 (in bits) type struct embodied was a declaration-only type and is now a defined type + [C] 'function void reg2(const disembodied*)' at test-decl-struct-v1.c:5:1 has some indirect sub-type changes: parameter 1 of type 'const disembodied*' has sub-type changes: in pointed to type 'const disembodied': in unqualified underlying type 'struct disembodied': type size changed from 32 to 0 (in bits) type struct disembodied was a defined type and is now a declaration-only type + -- 2.26.1.301.g55bc3eb7cb9-goog