[Xcb] [PATCH:libxcb] Enable warnings for pre-C89 style definitions for gcc & Solaris Studio
Alan Coopersmith
alan.coopersmith at oracle.com
Sat Aug 3 20:31:20 PDT 2013
Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
---
As requested by Josh - when used without the previously sent patch, causes
gcc to emit:
xcb_list.c: In function '_xcb_map_new':
xcb_list.c:50:11: warning: old-style function definition [-Wold-style-definition]
Unfortunately, xcb still has just these simple hardcoded lists of warning
flags - if xcb ever adopts the Xorg autoconf macros, then these would have
already been enabled by default on compilers that support them, along with
checking for support for more warnings (including those only found in newer
gcc versions, and tested to only enable them when available):
http://cgit.freedesktop.org/xorg/util/macros/tree/xorg-macros.m4.in#n1612
configure.ac | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac
index 7364383..6177c4b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -128,12 +128,12 @@ xcbincludedir='${includedir}/xcb'
AC_SUBST(xcbincludedir)
if test "x$GCC" = xyes ; then
- CWARNFLAGS="-Wall -pedantic -Wpointer-arith \
+ CWARNFLAGS="-Wall -pedantic -Wpointer-arith -Wold-style-definition \
-Wstrict-prototypes -Wmissing-declarations -Wnested-externs"
else
AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
if test "x$SUNCC" = "xyes"; then
- CWARNFLAGS="-v"
+ CWARNFLAGS="-v -fd"
fi
fi
AC_SUBST(CWARNFLAGS)
--
1.7.9.2
More information about the Xcb
mailing list