From 0d4514bf37d03f92d6e690eb7bdc9799f4a3e77c Mon Sep 17 00:00:00 2001 From: "Johan B. C. Engelen" Date: Thu, 20 Mar 2014 21:49:46 +0100 Subject: change more warnings into errors. eventually, we can better move to -Werror together with a short list of -Wno-error=... (bzr r13170) --- build.xml | 2 +- configure.ac | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/build.xml b/build.xml index 1e8341777..11c03b17f 100644 --- a/build.xml +++ b/build.xml @@ -351,7 +351,7 @@ - -Wall -Wformat -Werror=format-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 -Werror=switch -Werror=return-type -O2 -mms-bitfields diff --git a/configure.ac b/configure.ac index 56bd68e15..d2454da06 100644 --- a/configure.ac +++ b/configure.ac @@ -89,11 +89,14 @@ if test "$GCC" = "yes"; then # enforced in Gtk+ 3, so it is important to check this in Gtk+ 2 builds CPPFLAGS="-DGSEAL_ENABLE $CPPFLAGS" + # Unfortunately, we cannot (yet) build with -Werror, so we have to manually + # change a ton of warnings into errors. + # After some more work on fixing warning-inducing code, we can change this set into + # it's complement and use -Wno-error=... # Test for -Werror=... (introduced some time post-4.0) - # If we hit a format error -- it should be fatal. - AC_MSG_CHECKING([compiler support for -Werror=format-security]) + AC_MSG_CHECKING([compiler support for -Werror=...]) ink_svd_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="-Werror=format-security $CPPFLAGS" + CPPFLAGS="-Werror=format-security -Werror=switch -Werror=return-type $CPPFLAGS" AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])], [ink_opt_ok=yes], [ink_opt_ok=no]) AC_MSG_RESULT([$ink_opt_ok]) if test "x$ink_opt_ok" != "xyes"; then -- cgit v1.2.3