Commit b38bc157 authored by Lubomir Rintel's avatar Lubomir Rintel

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

  warning: unknown warning option '-Wno-unused-but-set-variable'; did you mean '-Wno-unused-const-variable'? [-Wunknown-warning-option]
parent edec77fb
......@@ -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 (
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])
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment