]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
Don't compile files generated by gengetopt with -Wall.
authorAndre Noll <maan@systemlinux.org>
Mon, 28 Mar 2011 22:00:23 +0000 (00:00 +0200)
committerAndre Noll <maan@systemlinux.org>
Mon, 28 Mar 2011 22:00:23 +0000 (00:00 +0200)
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

index e6b6ecc27367d12f46d189c3c75036d09acc1bb6..771bc1078f16bd08a103720e8f6ea792963973c0 100644 (file)
@@ -19,6 +19,9 @@ codename := deterministic entropy
 
 DEBUG_CPPFLAGS += -Wno-sign-compare -g -Wunused -Wundef -W
 DEBUG_CPPFLAGS += -Wredundant-decls
 
 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
 # 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 += -Wshadow
 endif
 CPPFLAGS += -Os
-CPPFLAGS += -Wall
 CPPFLAGS += -Wuninitialized
 CPPFLAGS += -Wchar-subscripts
 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 += -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
 CPPFLAGS += -Wmissing-noreturn
 CPPFLAGS += -Wunused-macros
 CPPFLAGS += -Wbad-function-cast