From bf8238b7053081c4de620e2b8950a00387b01d12 Mon Sep 17 00:00:00 2001 From: Donald Buczek Date: Mon, 1 Jan 2024 14:34:41 +0100 Subject: [PATCH] Makefile: Disable warning for Bison-generated source Bison-3.4.2 together with llvm 15.0.4 produce the warning parser.tab.c:1078:9: warning: variable 'yynerrs' set but not used Disable this warning for the parser.tab.c compilation. --- Makefile | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Makefile b/Makefile index 74bedae9..8e65603c 100644 --- a/Makefile +++ b/Makefile @@ -294,6 +294,7 @@ install:: scan-build:: scan-build $(MAKE) build + ######################################################################## ### mx_log.h ----------------------------------------------------------- @@ -361,6 +362,14 @@ ppidcache.h += ppidcache.h ######################################################################## +## parser.tab.o + +# Disable "variable 'yynerrs' set but not used" diagnostic which +# appears with bison-3.4.2 + llvm 15.0.4 + +parser.tab.o: parser.tab.c parser.tab.h + $(call quiet-command,${CC} ${CFLAGS} -Wno-unused-but-set-variable -o $@ -c $<," CC $@") + ### mx_getopt.o -------------------------------------------------------- mx_getopt.o: $(mx_getopt.h)