From c7269c6960a0f67fcd3f5c9b5bbaad53824d0ae9 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Tue, 29 Mar 2011 00:00:23 +0200 Subject: [PATCH] Don't compile files generated by gengetopt with -Wall. gcc-4.6.0 spits out lots of warningns of the form cmdline/recv.cmdline.c:439:9: warning: variable 'stop_char' set but not used [-Wunused-but-set-variable] Silence these warnings by moving -Wall to the set of debug flags which are not used for compiling *.cmdline.c files. For some versions of gcc, including gcc-3.3.3 which is still supported, the -Wformat-security and -Wmissing-format-attribute options depend on -Wformat, which is turned on by -Wall, so we have to move these options also to the DEBUG_CPPFLAGS. --- Makefile.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile.in b/Makefile.in index e6b6ecc2..771bc107 100644 --- a/Makefile.in +++ b/Makefile.in @@ -19,6 +19,9 @@ codename := deterministic entropy DEBUG_CPPFLAGS += -Wno-sign-compare -g -Wunused -Wundef -W DEBUG_CPPFLAGS += -Wredundant-decls +DEBUG_CPPFLAGS += -Wall +DEBUG_CPPFLAGS += -Wformat-security +DEBUG_CPPFLAGS += -Wmissing-format-attribute # produces false positives # DEBUG_CPPFLAGS += -Wunreachable-code # DEBUG_CPPFLAGS += -Wwrite-strings @@ -38,17 +41,14 @@ ifeq ($(uname_s),Linux) CPPFLAGS += -Wshadow endif CPPFLAGS += -Os -CPPFLAGS += -Wall CPPFLAGS += -Wuninitialized CPPFLAGS += -Wchar-subscripts -CPPFLAGS += -Wformat-security CPPFLAGS += -DBINDIR='"$(BINDIR)"' CPPFLAGS += -DBUILD_DATE='"$(build_date)"' CPPFLAGS += -DUNAME_RS='"$(uname_rs)"' CPPFLAGS += -DCODENAME='"$(codename)"' CPPFLAGS += -DCC_VERSION='"$(cc_version)"' CPPFLAGS += -Werror-implicit-function-declaration -CPPFLAGS += -Wmissing-format-attribute CPPFLAGS += -Wmissing-noreturn CPPFLAGS += -Wunused-macros CPPFLAGS += -Wbad-function-cast -- 2.39.2