Summary: fix, -Winline -> only if maximum warning output
authorSebastian Freundt <hroptatyr@fresse.org>
Sun, 8 Jan 2012 00:59:50 +0000 (00:59 +0000)
committerSebastian Freundt <hroptatyr@fresse.org>
Sun, 8 Jan 2012 03:21:24 +0000 (03:21 +0000)
Keywords: bldchn code hygiene warn-fix

This changeset fixes some inline related warnings by turning them off.

* m4/sxe-acx_pthread.m4: enable -Winline only with_maximum_warning_output

Signed-off-by: Sebastian Freundt <hroptatyr@fresse.org>
m4/sxe-compiler.m4

index 4648ac4..83d1634 100644 (file)
@@ -636,8 +636,6 @@ AC_DEFUN([SXE_WARNFLAGS], [dnl
                warnflags="$warnflags -Wmissing-declarations"])
        SXE_CHECK_COMPILER_FLAGS([-Wmissing-prototypes], [
                warnflags="$warnflags -Wmissing-prototypes"])
-       SXE_CHECK_COMPILER_FLAGS([-Winline], [
-               warnflags="$warnflags -Winline"])
        SXE_CHECK_COMPILER_FLAGS([-Wbad-function-cast], [
                warnflags="$warnflags -Wbad-function-cast"])
        SXE_CHECK_COMPILER_FLAGS([-Wcast-qual], [
@@ -645,6 +643,12 @@ AC_DEFUN([SXE_WARNFLAGS], [dnl
        SXE_CHECK_COMPILER_FLAGS([-Wcast-align], [
                warnflags="$warnflags -Wcast-align"])
 
+       ## too aggressive innit
+       if test "${with_maximum_warning_output}" = "yes"; then
+               SXE_CHECK_COMPILER_FLAGS([-Winline], [
+                       warnflags="$warnflags -Winline"])
+       fi
+
        ## warn about incomplete switches
        if test "${with_maximum_warning_output}" = "yes"; then
                SXE_CHECK_COMPILER_FLAGS([-Wswitch], [