[Pkg-telepathy-commits] [libnice] 65/265: build: Add various compiler warnings to --enable-compile-warnings
Simon McVittie
smcv at debian.org
Wed May 14 12:04:53 UTC 2014
This is an automated email from the git hooks/post-receive script.
smcv pushed a commit to branch debian
in repository libnice.
commit d0c5adbf56f398a6c00b75c56c80c541ec467839
Author: Philip Withnall <philip.withnall at collabora.co.uk>
Date: Fri Jan 3 08:52:36 2014 +0000
build: Add various compiler warnings to --enable-compile-warnings
Add various compiler warnings to the different levels of
--enable-compile-warnings. No particular scheme has been used to assign
different warnings to different levels, other than that more critical
ones are typically enabled at lower levels upwards.
All code in libnice except the tests currently compiles with
--enable-compile-warnings=error.
---
configure.ac | 60 +++++++++++++++++++++++++++++++++++++++++++++---------------
1 file changed, 45 insertions(+), 15 deletions(-)
diff --git a/configure.ac b/configure.ac
index 1e0d9af..ae2d811 100644
--- a/configure.ac
+++ b/configure.ac
@@ -114,22 +114,52 @@ AC_DEFUN([NICE_ADD_FLAG],
NICE_ADD_FLAG([-fno-strict-aliasing])
-AS_IF([test "x$enable_compile_warnings" != "xno"],[
+AS_IF([test "$enable_compile_warnings" != "no"],[
NICE_ADD_FLAG([-Wall])
- AS_IF([test "x$enable_compile_warnings" != "xminimum"],[
- NICE_ADD_FLAG([-Wextra])
- NICE_ADD_FLAG([-Wundef])
- NICE_ADD_FLAG([-Wnested-externs])
- NICE_ADD_FLAG([-Wwrite-strings])
- NICE_ADD_FLAG([-Wpointer-arith])
- NICE_ADD_FLAG([-Wbad-function-cast])
- NICE_ADD_FLAG([-Wmissing-declarations])
- NICE_ADD_FLAG([-Wmissing-prototypes])
- NICE_ADD_FLAG([-Wstrict-prototypes])
- NICE_ADD_FLAG([-Wredundant-decls])
- NICE_ADD_FLAG([-Wno-unused-parameter])
- NICE_ADD_FLAG([-Wno-missing-field-initializers])
- ])
+])
+AS_IF([test "$enable_compile_warnings" != "no" -a
+ "$enable_compile_warnings" != "minimum"],[
+ NICE_ADD_FLAG([-Wextra])
+ NICE_ADD_FLAG([-Wundef])
+ NICE_ADD_FLAG([-Wnested-externs])
+ NICE_ADD_FLAG([-Wwrite-strings])
+ NICE_ADD_FLAG([-Wpointer-arith])
+ NICE_ADD_FLAG([-Wbad-function-cast])
+ NICE_ADD_FLAG([-Wmissing-declarations])
+ NICE_ADD_FLAG([-Wmissing-prototypes])
+ NICE_ADD_FLAG([-Wstrict-prototypes])
+ NICE_ADD_FLAG([-Wredundant-decls])
+ NICE_ADD_FLAG([-Wno-unused-parameter])
+ NICE_ADD_FLAG([-Wno-missing-field-initializers])
+ NICE_ADD_FLAG([-Wdeclaration-after-statement])
+ NICE_ADD_FLAG([-Wformat=2])
+ NICE_ADD_FLAG([-Wold-style-definition])
+ NICE_ADD_FLAG([-Wcast-align])
+ NICE_ADD_FLAG([-Wformat-nonliteral])
+ NICE_ADD_FLAG([-Wformat-security])
+])
+AS_IF([test "$enable_compile_warnings" = "yes" -o \
+ "$enable_compile_warnings" = "maximum" -o \
+ "$enable_compile_warnings" = "error"],[
+ NICE_ADD_FLAG([-Wsign-compare])
+ NICE_ADD_FLAG([-Wstrict-aliasing])
+ NICE_ADD_FLAG([-Wunsafe-loop-optimizations])
+ NICE_ADD_FLAG([-Wshadow])
+ NICE_ADD_FLAG([-Winline])
+ NICE_ADD_FLAG([-Wpacked])
+ NICE_ADD_FLAG([-Wmissing-format-attribute])
+ NICE_ADD_FLAG([-Wmissing-noreturn])
+ NICE_ADD_FLAG([-Winit-self])
+ NICE_ADD_FLAG([-Wredundant-decls])
+ NICE_ADD_FLAG([-Wmissing-include-dirs])
+ NICE_ADD_FLAG([-Wunused-but-set-variable])
+ NICE_ADD_FLAG([-Warray-bounds])
+])
+AS_IF([test "$enable_compile_warnings" = "maximum" -o \
+ "$enable_compile_warnings" = "error"],[
+ NICE_ADD_FLAG([-Wswitch-enum])
+ NICE_ADD_FLAG([-Wswitch-default])
+ NICE_ADD_FLAG([-Waggregate-return])
])
AS_IF([test "x$enable_compile_warnings" = "xerror"],[
NICE_ADD_FLAG([-Werror])
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-telepathy/libnice.git
More information about the Pkg-telepathy-commits
mailing list