Kbuild: Disable the -Wformat-security gcc flag
authorFloris Kraak <randakar@gmail.com>
Mon, 15 Jun 2009 05:54:02 +0000 (08:54 +0300)
committerSam Ravnborg <sam@ravnborg.org>
Fri, 26 Jun 2009 22:15:27 +0000 (00:15 +0200)
Some distributions have enabled the gcc flag -Wformat-security by default.
This results in a number of warnings about format arguments to functions,
sometimes in cases where fixing the warning is not likely to actually fix a
bug.  Instead of hand patching a dozens of places (possibly more) that produce
warnings that get ignored anyway we just turn off the flag in the Makefile.

Signed-off-by: Floris Kraak <randakar@gmail.com>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Makefile

index d1216fe..8fb9bfc 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -344,7 +344,8 @@ KBUILD_CPPFLAGS := -D__KERNEL__
 
 KBUILD_CFLAGS   := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
                   -fno-strict-aliasing -fno-common \
-                  -Werror-implicit-function-declaration
+                  -Werror-implicit-function-declaration \
+                  -Wno-format-security
 KBUILD_AFLAGS   := -D__ASSEMBLY__
 
 # Read KERNELRELEASE from include/config/kernel.release (if it exists)