rendercheck: configure.ac t_bug7366.c tests.c
Eric Anholt
anholt at kemper.freedesktop.org
Fri Jan 12 02:16:47 EET 2007
configure.ac | 15 +++++++++++++--
t_bug7366.c | 2 +-
tests.c | 2 +-
3 files changed, 15 insertions(+), 4 deletions(-)
New commits:
diff-tree f5395a5866c4947dbfc30b8845f9400a422990ce (from 72cb2695ae1f78adef263eff779cc88541a41c87)
Author: Eric Anholt <eric at anholt.net>
Date: Thu Jan 11 16:16:27 2007 -0800
Add more gcc warning flags, and clean up the added warnings.
diff --git a/configure.ac b/configure.ac
index 5a12d87..84258dd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -15,6 +15,10 @@ AM_MAINTAINER_MODE
# Checks for programs.
AC_PROG_CC
+AC_ARG_ENABLE(werror, AS_HELP_STRING([--enable-werror],
+ [Treat warnings as errors (default: disabled)]),
+ [WERROR=$enableval], [WERROR=no])
+
# Checks for pkg-config packages
PKG_CHECK_MODULES(RC, xrender,
[xrender_found_with_pkgconfig=yes],
@@ -32,8 +36,15 @@ then
RC_LIBS="$X_LIBS -lXrender -lXext -lX11"
fi
-if test "x$GCC" = xyes ; then
- RC_CFLAGS="-Wall $RC_CFLAGS"
+if test "x$GCC" = "xyes"; then
+ GCC_WARNINGS1="-Wall -Wpointer-arith -Wstrict-prototypes"
+ GCC_WARNINGS2="-Wmissing-prototypes -Wmissing-declarations"
+ GCC_WARNINGS3="-Wnested-externs -fno-strict-aliasing"
+ GCC_WARNINGS="$GCC_WARNINGS1 $GCC_WARNINGS2 $GCC_WARNINGS3"
+ if test "x$WERROR" = "xyes"; then
+ GCC_WARNINGS="${GCC_WARNINGS} -Werror"
+ fi
+ RC_CFLAGS="$RC_CFLAGS $GCC_WARNINGS"
fi
AC_SUBST(RC_CFLAGS)
diff --git a/t_bug7366.c b/t_bug7366.c
index 9084327..1277580 100644
--- a/t_bug7366.c
+++ b/t_bug7366.c
@@ -26,7 +26,7 @@
#include "rendercheck.h"
-int
+static int
expecting_error(Display *dpy, XErrorEvent *event)
{
return TRUE;
diff --git a/tests.c b/tests.c
index 1111674..4db1413 100644
--- a/tests.c
+++ b/tests.c
@@ -202,7 +202,7 @@ argb_fill(Display *dpy, picture_info *p,
* us get more formats than just the standard required set, and lets us attach
* names to them.
*/
-void
+static void
create_formats_list(Display *dpy)
{
int i;
More information about the xorg-commit
mailing list