summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorJim Meyering <meyering@fb.com>2021-01-05 20:03:58 -0800
committerJim Meyering <meyering@fb.com>2021-01-05 20:03:58 -0800
commit74cda437ff9a594edb4c7300950cd23f2346f856 (patch)
treed15a8c38c6fe640928c11371d617d90ff3d1f6b8 /configure.ac
parentb216515f9c72dd7529e3e587abed101efd1d9ae5 (diff)
downloadgrep-74cda437ff9a594edb4c7300950cd23f2346f856.tar.gz
build: avoid long-string warnings in gnulib tests
* configure.ac (GNULIB_TEST_WARN_CFLAGS): Add -Woverlength-strings to avoid clang warnings.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac7
1 files changed, 7 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index b801aadb..c49ec4af 100644
--- a/configure.ac
+++ b/configure.ac
@@ -157,6 +157,13 @@ if test "$gl_gcc_warnings" = yes; then
nw="$nw -Wsuggest-attribute=format"
nw="$nw -Wformat-truncation=2" # False alarm in strerror_r.c
nw="$nw -Wold-style-definition"
+
+ # Disable to avoid warnings in e.g., test-intprops.c and test-limits-h.c
+ # due to overlong expansions like this:
+ # test-intprops.c:147:5: error: string literal of length 9531 exceeds \
+ # maximum length 4095 that ISO C99 compilers are required to support
+ nw="$nw -Woverlength-strings"
+
gl_MANYWARN_COMPLEMENT([GNULIB_TEST_WARN_CFLAGS],
[$GNULIB_WARN_CFLAGS], [$nw])
gl_WARN_ADD([-Wno-return-type], [GNULIB_TEST_WARN_CFLAGS])