[master] ade0181 Disable -Werror for warn_unused_result.

Tollef Fog Heen tfheen at varnish-software.com
Thu Nov 28 08:51:02 CET 2013


commit ade01815deceebaa2107fa9aea2847b8a54e51ee
Author: Tollef Fog Heen <tfheen at varnish-software.com>
Date:   Thu Nov 28 08:49:09 2013 +0100

    Disable -Werror for warn_unused_result.
    
    There is no way to disable warn_unused_result and glibc (or the gcc
    fortification patches) add that to write in higher optimisation
    levels.  We'll take the warning, but not make it fatal.
    
    See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25509 for the relevant
    gcc bug report.

diff --git a/configure.ac b/configure.ac
index 6fdd780..6b3fcd4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -451,9 +451,13 @@ gl_LD_VERSION_SCRIPT
 # Now that we're done using the compiler to look for functions and
 # libraries, set CFLAGS to what we want them to be for our own code
 
-# This is a test to see how much havoc Jenkins exposes
-CFLAGS="${CFLAGS} -Wall -Werror"
-OCFLAGS="${OCFLAGS} -Wall -Werror"
+# This is a test to see how much havoc Jenkins exposes.
+#
+# The reason for -Wno-error=unused-result is a glibc/gcc interaction
+# idiocy where write is marked as warn_unused_result, causing build
+# failures.
+CFLAGS="${CFLAGS} -Wall -Werror -Wno-error=unused-result"
+OCFLAGS="${OCFLAGS} -Wall -Werror  -Wno-error=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