From: des Date: Fri, 11 May 2007 11:06:38 +0000 (+0000) Subject: Tweak DEVELOPER_CFLAGS. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d5d7c87840f837a1080f28110f6057573cbb6f30;p=varnish Tweak DEVELOPER_CFLAGS. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@1407 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/configure.ac b/varnish-cache/configure.ac index 8015f587..cff31b08 100644 --- a/varnish-cache/configure.ac +++ b/varnish-cache/configure.ac @@ -101,7 +101,13 @@ AC_CHECK_FUNCS([poll]) # 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 -DEVELOPER_CFLAGS="-Wall -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wunused-parameter -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wformat" + +# This corresponds to FreeBSD's WARNS level 6 +DEVELOPER_CFLAGS="-Wall -Wextra -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wunused-parameter -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wformat" + +# Turn off warnings for two issues which occur frequently in our code +DEVELOPER_CFLAGS="${DEVELOPER_CFLAGS} -Wno-missing-field-initializers -Wno-sign-compare" + AC_ARG_ENABLE(developer-warnings, AS_HELP_STRING([--enable-developer-warnings],[enable strict warnings (default is NO)]), CFLAGS="${CFLAGS} ${DEVELOPER_CFLAGS}")