summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorLubomir Rintel <lkundrak@v3.sk>2015-09-29 13:54:21 +0200
committerLubomir Rintel <lkundrak@v3.sk>2015-09-29 14:08:14 +0200
commit2d80ed664fbdb823a01d993be4c0e48262a867fe (patch)
tree91ef4ec78917fe55b2ad0a5f7254ecf2f184908c /m4
parent9ecb79d230e7dd6cff7f726771ccf0bbb1dd1f51 (diff)
build: set -Werror when checking whether a -W<warning> option works
Otherwise the check is effectively a no-op and unknown options still get turned on. This results in unknown warnings when build without --with-extra-warnings=error: warning: unknown warning option '-Wno-unused-but-set-variable'; did you mean '-Wno-unused-const-variable'? [-Wunknown-warning-option]
Diffstat (limited to 'm4')
-rw-r--r--m4/compiler_warnings.m42
1 files changed, 1 insertions, 1 deletions
diff --git a/m4/compiler_warnings.m4 b/m4/compiler_warnings.m4
index a1c4e1288..a7d6669d4 100644
--- a/m4/compiler_warnings.m4
+++ b/m4/compiler_warnings.m4
@@ -56,7 +56,7 @@ if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then
-Wpointer-arith -Winit-self \
-Wmissing-include-dirs -Wno-pragmas; do
dnl GCC 4.4 does not warn when checking for -Wno-* flags (https://gcc.gnu.org/wiki/FAQ#wnowarning)
- CFLAGS="$CFLAGS_MORE_WARNINGS $(printf '%s' "$option" | sed 's/^-Wno-/-W/') $CFLAGS_SAVED"
+ CFLAGS="-Werror $CFLAGS_MORE_WARNINGS $(printf '%s' "$option" | sed 's/^-Wno-/-W/') $CFLAGS_SAVED"
AC_MSG_CHECKING([whether compiler understands $option])
AC_TRY_COMPILE([], [],
has_option=yes,