Code

make format string warnings fatal, since it should never happen
authorkeescook <keescook@users.sourceforge.net>
Tue, 29 Apr 2008 17:09:57 +0000 (17:09 +0000)
committerkeescook <keescook@users.sourceforge.net>
Tue, 29 Apr 2008 17:09:57 +0000 (17:09 +0000)
build.xml
configure.ac

index d0c4074f603ff896bd7de752037f3917357d19e2..91b6eb007693a83aed317c0b3a8e625e3a17c5f9 100644 (file)
--- a/build.xml
+++ b/build.xml
             <file name="extension/param"/>
         </excludeinc>
         <flags>
-            -Wall -Wformat-security -W -Wpointer-arith -Wcast-align -Wsign-compare -Woverloaded-virtual -Wswitch
+            -Wall -Wformat -Werror=format-security -W -Wpointer-arith -Wcast-align -Wsign-compare -Woverloaded-virtual -Wswitch
             -O2
             -mms-bitfields
         </flags>
index 9cecae403d548cb7a0d250d4edecf86a63acabbb..313d349a8b28e002e5c28ae7f11af4f5050a0826 100644 (file)
@@ -43,7 +43,7 @@ if test "$GCC" = "yes"; then
   ink_svd_CFLAGS="$CFLAGS"
   CFLAGS="-Wno-pointer-sign $CFLAGS"
   AC_COMPILE_IFELSE(AC_LANG_PROGRAM([]), AC_MSG_NOTICE([ compiler supports -Wno-pointer-sign]), CFLAGS="$ink_svd_CFLAGS")
-  CFLAGS="-Wall -Wformat-security -W -D_FORTIFY_SOURCE=2 $CFLAGS"
+  CFLAGS="-Wall -Wformat -Werror=format-security -W -D_FORTIFY_SOURCE=2 $CFLAGS"
   AC_LANG_POP
 fi
 
@@ -751,7 +751,7 @@ if test "$GXX" = "yes"; then
   # programmer deliberately has an unused parameter (e.g. because it's used
   # as a callback or similar function pointer use).
 
-  CXXFLAGS="-Wall -Wformat-security -W -Wpointer-arith -Wcast-align -Wsign-compare -Woverloaded-virtual -Wswitch -D_FORTIFY_SOURCE=2 $CXXFLAGS"
+  CXXFLAGS="-Wall -Wformat -Werror=format-security -W -Wpointer-arith -Wcast-align -Wsign-compare -Woverloaded-virtual -Wswitch -D_FORTIFY_SOURCE=2 $CXXFLAGS"
 
   dnl Test for arch-specific situations.
   case "$host_cpu" in