summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorCarl Worth <cworth@cworth.org>2006-08-28 18:54:35 -0700
committerCarl Worth <cworth@cworth.org>2006-08-28 18:55:02 -0700
commit50003615f28862f68b609aa290ebffee24d5d643 (patch)
tree7df8904b0821029ea4f16ffe59876b249574ea2f /configure.in
parent5492946b0ced9b3e97f94ef097ee745c8a59df42 (diff)
Add -Wextra (as well as -Wno-missing-field-initializers -Wno-unused-parameter)
We'd been wanting some of the warnings in -Wextra for a long time, but we had failed in tryingto squelch some of the undesired warnings. We finally figured out how to do this correctly by simply ordering the warnings correctly.
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in20
1 files changed, 16 insertions, 4 deletions
diff --git a/configure.in b/configure.in
index 7a0484ba0..94328ae78 100644
--- a/configure.in
+++ b/configure.in
@@ -94,7 +94,7 @@ dnl cairo_cache_version should be increased every time that the backend
dnl detection stuff changes in a way that removing the config.cache file may be
dnl needed for correct operation.
dnl
-m4_define(cairo_cache_version, 3)
+m4_define(cairo_cache_version, 4)
dnl ===========================================================================
dnl
@@ -563,13 +563,25 @@ AC_CACHE_CHECK([for supported warning flags], cairo_cv_warn_cflags, [
echo
WARN_CFLAGS=""
- # some warnings are not supported by all versions of gcc
- MAYBE_WARN="-Wall -Wsign-compare -Werror-implicit-function-declaration \
+ # Some warning options are not supported by all versions of
+ # gcc, so test all desired options against the current
+ # compiler.
+ #
+ # Note that there are some order dependencies
+ # here. Specifically, an option that disables a warning will
+ # have no net effect if a later option then enables that
+ # warnings, (perhaps implicitly). So we put some grouped
+ # options (-Wall and -Wextra) up front and the -Wno options
+ # last.
+
+ MAYBE_WARN="-Wall -Wextra \
+ -Wsign-compare -Werror-implicit-function-declaration \
-Wpointer-arith -Wwrite-strings -Wstrict-prototypes \
-Wmissing-prototypes -Wmissing-declarations -Wnested-externs \
-Wpacked -Wswitch-enum -Wmissing-format-attribute \
-Wstrict-aliasing=2 -Winit-self -Wunsafe-loop-optimizations \
- -Wdeclaration-after-statement -Wold-style-definition"
+ -Wdeclaration-after-statement -Wold-style-definition \
+ -Wno-missing-field-initializers -Wno-unused-parameter"
for W in $MAYBE_WARN; do
CAIRO_CC_TRY_FLAG([$W], [WARN_CFLAGS="$WARN_CFLAGS $W"])