From dd344b43e87ef5a24a4ba739821998605e38a015 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 1 Nov 2013 13:00:15 +0100 Subject: Enable -Wshadow This one really did bite me hard (see previous commit), so enable it by default. Fix some cases of shadowing throughout the codebase. None of these change behavior, and all of these were correct code, and just tripped up the warning. --- configure | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'configure') diff --git a/configure b/configure index 40d15d82d5..a15e08bca5 100755 --- a/configure +++ b/configure @@ -1153,14 +1153,14 @@ if test -z "$CFLAGS" ; then WARNFLAGS="-wd167 -wd556 -wd144" elif test "$cc_vendor" = "clang"; then CFLAGS="$_opt $_debug $_pipe" - WARNFLAGS="-Wall -Wno-switch -Wno-logical-op-parentheses -Wpointer-arith -Wundef -Wno-pointer-sign -Wmissing-prototypes" + WARNFLAGS="-Wall -Wno-switch -Wno-logical-op-parentheses -Wpointer-arith -Wundef -Wno-pointer-sign -Wmissing-prototypes -Wshadow" ERRORFLAGS="-Werror=implicit-function-declaration -Wno-error=deprecated-declarations -Wno-error=unused-function" elif test "$cc_vendor" != "gnu" ; then CFLAGS="$_opt $_debug $_pipe" else CFLAGS="$_opt $_debug $_pipe" WARNFLAGS="-Wall -Wno-switch -Wno-parentheses -Wpointer-arith -Wredundant-decls" - ERRORFLAGS="-Werror-implicit-function-declaration -Wno-error=deprecated-declarations -Wno-error=unused-function" + ERRORFLAGS="-Werror-implicit-function-declaration -Wno-error=deprecated-declarations -Wno-error=unused-function -Wshadow" extra_ldflags="$extra_ldflags" fi else -- cgit v1.2.3