From: Marko Kreen Date: Wed, 5 Dec 2007 20:22:20 +0000 (+0000) Subject: seems Wextra does not turn on all warnings X-Git-Tag: pgbouncer_1_2_rc2~118 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7e1455cce20a67efbe1308a3818de88144c2ebbe;p=pgbouncer seems Wextra does not turn on all warnings --- diff --git a/configure.ac b/configure.ac index 8776f1b..103d7bc 100644 --- a/configure.ac +++ b/configure.ac @@ -37,8 +37,14 @@ if test x"$GCC" = xyes; then AC_MSG_CHECKING([for working warning switches]) good_CFLAGS="$CFLAGS" warnings="" - for f in -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers - do + flags="-Wall -Wextra" + # turn off noise from Wextra + flags="$flags -Wno-unused-parameter -Wno-missing-field-initializers" + # Wextra does not turn those on? + flags="$flags -Wmissing-prototypes -Wpointer-arith -Wendif-labels" + flags="$flags -Wdeclaration-after-statement -Wold-style-definition" + flags="$flags -Wstrict-prototypes" + for f in $flags; do CFLAGS="$good_CFLAGS $warnings $f" AC_COMPILE_IFELSE([void foo(void){}], [warnings="$warnings $f"]) done