Summary: chore, deactivate some warnings again (if not aggressive)
authorSebastian Freundt <freundt@ga-group.nl>
Fri, 6 Jan 2012 18:58:51 +0000 (18:58 +0000)
committerSebastian Freundt <hroptatyr@fresse.org>
Sun, 8 Jan 2012 03:08:27 +0000 (03:08 +0000)
Keywords: bldchn

This changeset demotes some of the warning flags again to the special
--with-maximum-warning-output option.

* m4/sxe-compiler.m4: conditionalise on some warning switches again

Signed-off-by: Sebastian Freundt <freundt@ga-group.nl>
m4/sxe-compiler.m4

index dac0909..4648ac4 100644 (file)
@@ -607,12 +607,14 @@ AC_DEFUN([SXE_WARNFLAGS], [dnl
        ## Warnings about char subscripts are pretty
        ## pointless, though,
        ## and we use them in various places.
-       SXE_CHECK_COMPILER_FLAGS([-Wsign-compare], [
-               warnflags="$warnflags -Wsign-compare"])
-       SXE_CHECK_COMPILER_FLAGS([-Wno-char-subscripts], [
-               warnflags="$warnflags -Wno-char-subscripts"])
-       SXE_CHECK_COMPILER_FLAGS([-Wundef], [
-               warnflags="$warnflags -Wundef"])
+       if test "${with_maximum_warning_output}" = "yes"; then
+               SXE_CHECK_COMPILER_FLAGS([-Wsign-compare], [
+                       warnflags="$warnflags -Wsign-compare"])
+               SXE_CHECK_COMPILER_FLAGS([-Wno-char-subscripts], [
+                       warnflags="$warnflags -Wno-char-subscripts"])
+               SXE_CHECK_COMPILER_FLAGS([-Wundef], [
+                       warnflags="$warnflags -Wundef"])
+       fi
 
        ## too much at the moment, we rarely define protos
        #warnflags="$warnflags -Wmissing-prototypes -Wstrict-prototypes"
@@ -644,24 +646,28 @@ AC_DEFUN([SXE_WARNFLAGS], [dnl
                warnflags="$warnflags -Wcast-align"])
 
        ## warn about incomplete switches
-       SXE_CHECK_COMPILER_FLAGS([-Wswitch], [
-               warnflags="$warnflags -Wswitch"])
-       SXE_CHECK_COMPILER_FLAGS([-Wswitch-default], [
-               warnflags="$warnflags -Wswitch-default"])
-       SXE_CHECK_COMPILER_FLAGS([-Wswitch-enum], [
-               warnflags="$warnflags -Wswitch-enum"])
+       if test "${with_maximum_warning_output}" = "yes"; then
+               SXE_CHECK_COMPILER_FLAGS([-Wswitch], [
+                       warnflags="$warnflags -Wswitch"])
+               SXE_CHECK_COMPILER_FLAGS([-Wswitch-default], [
+                       warnflags="$warnflags -Wswitch-default"])
+               SXE_CHECK_COMPILER_FLAGS([-Wswitch-enum], [
+                       warnflags="$warnflags -Wswitch-enum"])
+       fi
 
        ## Wunused's
-       SXE_CHECK_COMPILER_FLAGS([-Wunused-function], [
-               warnflags="$warnflags -Wunused-function"])
-       SXE_CHECK_COMPILER_FLAGS([-Wunused-variable], [
-               warnflags="$warnflags -Wunused-variable"])
-       SXE_CHECK_COMPILER_FLAGS([-Wunused-parameter], [
-               warnflags="$warnflags -Wunused-parameter"])
-       SXE_CHECK_COMPILER_FLAGS([-Wunused-value], [
-               warnflags="$warnflags -Wunused-value"])
-       SXE_CHECK_COMPILER_FLAGS([-Wunused], [
-               warnflags="$warnflags -Wunused"])
+       if test "${with_maximum_warning_output}" = "yes"; then
+               SXE_CHECK_COMPILER_FLAGS([-Wunused-function], [
+                       warnflags="$warnflags -Wunused-function"])
+               SXE_CHECK_COMPILER_FLAGS([-Wunused-variable], [
+                       warnflags="$warnflags -Wunused-variable"])
+               SXE_CHECK_COMPILER_FLAGS([-Wunused-parameter], [
+                       warnflags="$warnflags -Wunused-parameter"])
+               SXE_CHECK_COMPILER_FLAGS([-Wunused-value], [
+                       warnflags="$warnflags -Wunused-value"])
+               SXE_CHECK_COMPILER_FLAGS([-Wunused], [
+                       warnflags="$warnflags -Wunused"])
+       fi
 
        ## icc
        SXE_CHECK_COMPILER_FLAGS([-Wreorder], [