summaryrefslogtreecommitdiff
path: root/gnulib-tests/Makefile.am
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2010-10-13 11:20:18 +0200
committerJim Meyering <meyering@redhat.com>2010-10-13 11:20:18 +0200
commit71a3fd73a1fa005ee4ac969e57b43f90237656b9 (patch)
tree80786078692fcf2eea6368d3b08510abebb6ac56 /gnulib-tests/Makefile.am
parent9300fffcb54006bf471d96d70cf98081152c6fb1 (diff)
downloadcoreutils-71a3fd73a1fa005ee4ac969e57b43f90237656b9.tar.xz
build: prepare to enable -Werror also for gnulib-tests/
* configure.ac (GNULIB_WARN_CFLAGS): Define new variable, for use in gnulib-tests. * gnulib-tests/Makefile.am: Disable specific -W___ options, but only for a few specific offending tests: (test_xvasprintf_CFLAGS): Define. (test_lock_CFLAGS, test_tls_CFLAGS): Define.
Diffstat (limited to 'gnulib-tests/Makefile.am')
-rw-r--r--gnulib-tests/Makefile.am16
1 files changed, 15 insertions, 1 deletions
diff --git a/gnulib-tests/Makefile.am b/gnulib-tests/Makefile.am
index c3a48e841..7ec0a1cdd 100644
--- a/gnulib-tests/Makefile.am
+++ b/gnulib-tests/Makefile.am
@@ -1,3 +1,17 @@
include gnulib.mk
-AM_CFLAGS = $(GNULIB_WARN_CFLAGS) # $(WERROR_CFLAGS)
+AM_CFLAGS = $(GNULIB_TEST_WARN_CFLAGS) # $(WERROR_CFLAGS)
+
+# A few tests are inherently warning-evoking.
+# Since we require -Werror, exempt the few offenders.
+
+# test-xvasprintf.c: In function 'test_xasprintf':
+# test-xvasprintf.c:100: error: format not a string literal and no \
+# format arguments [-Wformat-security]
+test_xvasprintf_CFLAGS = $(AM_CFLAGS) -Wno-format-security
+
+# test-lock.c: In function 'lock_mutator_thread':
+# test-lock.c:148: error: cast from function call of type 'pthread_t' to \
+# non-matching type 'void *' [-Wbad-function-cast]
+test_lock_CFLAGS = $(AM_CFLAGS) -Wno-bad-function-cast
+test_tls_CFLAGS = $(AM_CFLAGS) -Wno-bad-function-cast