Skip to content
Permalink
Browse files
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.
  • Loading branch information
slouken committed Jun 20, 2015
1 parent 903df4a commit fb5732dc5c0b5bbda351a88c1dbe79a1fe30c56f

File 2 of 2 in fb5732d

@@ -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

0 comments on commit fb5732d

Please sign in to comment.