summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--build.xml2
-rw-r--r--configure.ac9
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 @@
</excludeinc>
<flags>
<!-- -std=gnu++0x -DCPP11 -->
- -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