From patchwork Tue Mar 1 10:47:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dodji Seketeli X-Patchwork-Id: 51467 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 32AC6385840A for ; Tue, 1 Mar 2022 10:47:57 +0000 (GMT) X-Original-To: libabigail@sourceware.org Delivered-To: libabigail@sourceware.org Received: from relay12.mail.gandi.net (relay12.mail.gandi.net [IPv6:2001:4b98:dc4:8::232]) by sourceware.org (Postfix) with ESMTPS id A49863858C78 for ; Tue, 1 Mar 2022 10:47:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A49863858C78 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=seketeli.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=seketeli.org Received: (Authenticated sender: dodji@seketeli.org) by mail.gandi.net (Postfix) with ESMTPSA id CAB5B20000F for ; Tue, 1 Mar 2022 10:47:51 +0000 (UTC) Received: by localhost (Postfix, from userid 1000) id 4BCA25802B4; Tue, 1 Mar 2022 11:47:51 +0100 (CET) From: Dodji Seketeli To: libabigail@sourceware.org Subject: [PATCH] reader: Fix a compilation warning Organization: Me, myself and I X-Operating-System: Fedora 36 X-URL: http://www.seketeli.net/~dodji Date: Tue, 01 Mar 2022 11:47:51 +0100 Message-ID: <87h78ij6eg.fsf@seketeli.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 X-Spam-Status: No, score=-9.4 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libabigail@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Mailing list of the Libabigail project List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , Errors-To: libabigail-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libabigail" Hello, I came across this compilation warning. Fixed thus. * src/abg-reader.cc (build_var_decl): Add braces to an 'if' statement. Signed-off-by: Dodji Seketeli --- src/abg-reader.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/abg-reader.cc b/src/abg-reader.cc index 7070fa9f..31885692 100644 --- a/src/abg-reader.cc +++ b/src/abg-reader.cc @@ -3802,9 +3802,11 @@ build_var_decl(read_context& ctxt, ctxt.push_decl_to_current_scope(decl, add_to_current_scope); if (add_to_current_scope) - // This variable is really being kept in the IR, so let's record - // that it's using its type. - RECORD_ARTIFACT_AS_USED_BY(ctxt, underlying_type, decl); + { + // This variable is really being kept in the IR, so let's record + // that it's using its type. + RECORD_ARTIFACT_AS_USED_BY(ctxt, underlying_type, decl); + } if (decl->get_symbol() && decl->get_symbol()->is_public()) decl->set_is_in_public_symbol_table(true);