From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1791) id CA6103857BBF; Tue, 1 Nov 2022 13:08:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CA6103857BBF DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1667308124; bh=COWjekO12fvRTNpnR7nYc3CW/auui+4n+mU52S3kjak=; h=From:To:Subject:Date:From; b=PzrfnEH1T5mDRc3ym5nLwQug67ayZwyEGf6SyIV6S0iWsfYYe75TGLtE9IsflnSSm cIVn651f0Rw+ab8uuHPfycJgiYAA5/u2SoVWjO/2KfbUR7jTzzpD0cvTG3tHcUh3gA AMiZTSrFg0DxT8PUXTWr4FPGCumQYN4pFlCvnzKA= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Adhemerval Zanella To: glibc-cvs@sourceware.org Subject: [glibc] intl: Fix clang -Wunused-but-set-variable on plural.c X-Act-Checkin: glibc X-Git-Author: Adhemerval Zanella X-Git-Refname: refs/heads/master X-Git-Oldrev: d227fd53cbbc9ae7e5604da3669d04b6ccb53aa1 X-Git-Newrev: 6ee5a9767a245455720d39eeaa3ce136825e8a42 Message-Id: <20221101130844.CA6103857BBF@sourceware.org> Date: Tue, 1 Nov 2022 13:08:44 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=6ee5a9767a245455720d39eeaa3ce136825e8a42 commit 6ee5a9767a245455720d39eeaa3ce136825e8a42 Author: Adhemerval Zanella Date: Wed Aug 24 11:13:23 2022 -0300 intl: Fix clang -Wunused-but-set-variable on plural.c Clang warns that '__gettextnerrs' set but not used: intl/plural.c:1034:9: error: variable '__gettextnerrs' set but not used [-Werror,-Wunused-but-set-variable] int yynerrs = 0; ^ Clang 15 (https://reviews.llvm.org/D122271) -Wunused-but-set-variable gives a warning while GCC doesn't. The -Wunused-but-set-variable is available in GCC 4.6, lower than the minimum required version 6.2. Since the file is auto-generated, suppress the warning with a compiler flag. Reviewed-by: Fangrui Song Diff: --- intl/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/intl/Makefile b/intl/Makefile index 315c75a18f..1c3b2a2273 100644 --- a/intl/Makefile +++ b/intl/Makefile @@ -154,7 +154,8 @@ $(objpfx)tst-gettext5.out: $(objpfx)tst-gettext.out $(objpfx)tst-gettext6.out: $(objpfx)tst-gettext.out CPPFLAGS += -D'LOCALEDIR="$(localedir)"' \ - -D'LOCALE_ALIAS_PATH="$(localedir)"' + -D'LOCALE_ALIAS_PATH="$(localedir)"' \ + -Wno-unused-but-set-variable BISONFLAGS = --yacc --no-lines --name-prefix=__gettext --output $(inst_localedir)/locale.alias: locale.alias $(+force)