GCC is warning about global functions with the same name as variables in the code, when using -Wshadow. This is a little ridiculous because we have no idea what functions a given platform will provide, so we'll disable -Wshadow for now.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97
diff --git a/configure b/configure
index 6a86333..50c4551 100755
--- a/configure
+++ b/configure
@@ -18701,43 +18701,6 @@ $as_echo "$need_gcc_Wno_multichar" >&6; }
fi
}
-CheckWarnShadow()
-{
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC -Wshadow option" >&5
-$as_echo_n "checking for GCC -Wshadow option... " >&6; }
- have_gcc_Wshadow=no
-
- save_CFLAGS="$CFLAGS"
- CFLAGS="$save_CFLAGS -Wshadow"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
- int x = 0;
-
-int
-main ()
-{
-
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- have_gcc_Wshadow=yes
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_Wshadow" >&5
-$as_echo "$have_gcc_Wshadow" >&6; }
- CFLAGS="$save_CFLAGS"
-
- if test x$have_gcc_Wshadow = xyes; then
- EXTRA_CFLAGS="$EXTRA_CFLAGS -Wshadow"
- fi
-}
-
CheckWayland()
{
# Check whether --enable-video-wayland was given.
@@ -23652,7 +23615,6 @@ $as_echo "#define SDL_TIMER_UNIX 1" >>confdefs.h
esac
CheckWarnAll
-CheckWarnShadow
# Verify that we have all the platform specific files we need
diff --git a/configure.in b/configure.in
index 75b2d21..1339ea8 100644
--- a/configure.in
+++ b/configure.in
@@ -1159,28 +1159,6 @@ CheckWarnAll()
fi
}
-dnl See if GCC's -Wshadow is supported.
-CheckWarnShadow()
-{
- AC_MSG_CHECKING(for GCC -Wshadow option)
- have_gcc_Wshadow=no
-
- save_CFLAGS="$CFLAGS"
- CFLAGS="$save_CFLAGS -Wshadow"
- AC_TRY_COMPILE([
- int x = 0;
- ],[
- ],[
- have_gcc_Wshadow=yes
- ])
- AC_MSG_RESULT($have_gcc_Wshadow)
- CFLAGS="$save_CFLAGS"
-
- if test x$have_gcc_Wshadow = xyes; then
- EXTRA_CFLAGS="$EXTRA_CFLAGS -Wshadow"
- fi
-}
-
dnl Check for Wayland
CheckWayland()
{
@@ -3415,7 +3393,6 @@ esac
dnl Do this on all platforms, after everything else.
CheckWarnAll
-CheckWarnShadow
# Verify that we have all the platform specific files we need