[master] b9226c1 Only add -Wno-unused-result if supported.

Tollef Fog Heen tfheen at varnish-software.com
Thu Nov 28 13:03:50 CET 2013


commit b9226c1f7ed85f0f277f7a11b4dbbc6deb4d4e26
Author: Tollef Fog Heen <tfheen at varnish-software.com>
Date:   Thu Nov 28 13:03:41 2013 +0100

    Only add -Wno-unused-result if supported.

diff --git a/configure.ac b/configure.ac
index ea7adc9..10ed5d1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -461,8 +461,9 @@ OCFLAGS="${OCFLAGS} -Wall -Werror"
 AX_CHECK_COMPILE_FLAG([-Wno-error=unused-result],
     [CFLAGS="${CFLAGS} -Wno-error=unused-result"
      OCFLAGS="${OCFLAGS} -Wno-error=unused-result"],
-    [CFLAGS="${CFLAGS} -Wno-unused-result"
-     OCFLAGS="${OCFLAGS} -Wno-unused-result"])
+    [AX_CHECK_COMPILE_FLAG([-Wno-unused-result],
+     [CFLAGS="${CFLAGS} -Wno-unused-result"
+      OCFLAGS="${OCFLAGS} -Wno-unused-result"])])
 
 # This corresponds to FreeBSD's WARNS level 6
 DEVELOPER_CFLAGS="-fstack-protector -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts -Winline -Wnested-externs -Wno-pointer-sign -Wextra -Wno-missing-field-initializers -Wno-sign-compare"



More information about the varnish-commit mailing list