[evolution-data-server] Bug 653157 - Enable extra compiler warnings in maintainer mode only



commit d405a8a309a811ad18bd89e65af2880d9e5e0a84
Author: Milan Crha <mcrha redhat com>
Date:   Mon Sep 29 13:01:24 2014 +0200

    Bug 653157 - Enable extra compiler warnings in maintainer mode only
    
    The 'extra' means also deprecated warnings. Those are not interesting
    for non-developers.

 configure.ac |   41 ++++++++++++++++++++++++-----------------
 1 files changed, 24 insertions(+), 17 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 2bdfe9f..93a5432 100644
--- a/configure.ac
+++ b/configure.ac
@@ -178,15 +178,31 @@ dnl *********************************************
 EVO_PHONENUMBER_ARGS
 
 dnl ******************************
+dnl Initialize maintainer mode
+dnl ******************************
+AM_MAINTAINER_MODE([enable])
+
+if test "x$enable_maintainer_mode" = "xyes" ; then
+       AC_DEFINE(ENABLE_MAINTAINER_MODE, 1, [Configured with enabled maintainer mode])
+fi
+
+dnl ******************************
 dnl Compiler Warning Flags
 dnl ******************************
-proposed_warning_flags="-Wall -Wextra
-       -Wdeprecated-declarations
-       -Werror-implicit-function-declaration
-       -Wformat-security -Winit-self
-       -Wmissing-declarations -Wmissing-include-dirs
-       -Wmissing-noreturn -Wpointer-arith
-       -Wredundant-decls -Wundef -Wwrite-strings"
+proposed_warning_flags=
+
+if test "x$enable_maintainer_mode" = "xyes" ; then
+       proposed_warning_flags="-Wall -Wextra -Wdeprecated-declarations"
+else
+       proposed_warning_flags="-Wno-deprecated-declarations"
+fi
+
+proposed_warning_flags="$proposed_warning_flags
+               -Werror-implicit-function-declaration
+               -Wformat -Wformat-security -Winit-self
+               -Wmissing-declarations -Wmissing-include-dirs
+               -Wmissing-noreturn -Wpointer-arith
+               -Wredundant-decls -Wundef -Wwrite-strings"
 
 proposed_c_warning_flags="$proposed_warning_flags
        -Wdeclaration-after-statement
@@ -227,7 +243,7 @@ dnl Permits linking of C++ based libraries using the C linker if needed.
 AC_SUBST([predeps_CXX])
 AC_SUBST([postdeps_CXX])
 
-AM_CPPFLAGS=
+AM_CPPFLAGS="$WARNING_FLAGS -fno-strict-aliasing"
 
 dnl Warn about API usage that violates our minimum requirements.
 AM_CPPFLAGS="$AM_CPPFLAGS -DGLIB_VERSION_MAX_ALLOWED=glib_encoded_version"
@@ -244,15 +260,6 @@ AM_CPPFLAGS="$AM_CPPFLAGS -DSOUP_VERSION_MIN_REQUIRED=soup_encoded_version"
 
 AC_SUBST(AM_CPPFLAGS)
 
-dnl ******************************
-dnl Initialize maintainer mode
-dnl ******************************
-AM_MAINTAINER_MODE([enable])
-
-if test "x$enable_maintainer_mode" = "xyes" ; then
-       AC_DEFINE(ENABLE_MAINTAINER_MODE, 1, [Configured with enabled maintainer mode])
-fi
-
 AC_PROG_CC
 AC_PROG_CPP
 AC_C_INLINE


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]