aboutsummaryrefslogtreecommitdiff
path: root/intl
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2022-08-24 11:13:23 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2022-11-01 09:45:34 -0300
commit6ee5a9767a245455720d39eeaa3ce136825e8a42 (patch)
tree2deb836e1450bd1754d14fdbcc93563ecf79bcb9 /intl
parentd227fd53cbbc9ae7e5604da3669d04b6ccb53aa1 (diff)
downloadglibc-6ee5a9767a245455720d39eeaa3ce136825e8a42.zip
glibc-6ee5a9767a245455720d39eeaa3ce136825e8a42.tar.gz
glibc-6ee5a9767a245455720d39eeaa3ce136825e8a42.tar.bz2
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 <maskray@google.com>
Diffstat (limited to 'intl')
-rw-r--r--intl/Makefile3
1 files changed, 2 insertions, 1 deletions
diff --git a/intl/Makefile b/intl/Makefile
index 315c75a..1c3b2a2 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)