diff options
author | Jim Meyering <meyering@fb.com> | 2018-06-30 19:27:21 -0700 |
---|---|---|
committer | Jim Meyering <meyering@fb.com> | 2018-06-30 19:28:09 -0700 |
commit | 203e40cc4558a80998d05eb74b373a51e796ca8b (patch) | |
tree | a07e783d76456bcc6d2bb337b8c5f9cca0a43037 /configure.ac | |
parent | 7868e29c3faca087be3790ab78ba570c3018bcb7 (diff) | |
download | gzip-203e40cc4558a80998d05eb74b373a51e796ca8b.tar.gz |
build: remove -Wformat-truncation=2 to avoid avoid false-positive
* configure.ac (GNULIB_WARN_CFLAGS): Add -Wformat-truncation=2,
to disable it when building gnulib with --enable-gcc-warnings.
This avoids what looks like a false positive from GCC 9:
strerror_r.c: In function 'rpl_strerror_r':
strerror_r.c:453:35: error: 'Unknown error ' directive output \
truncated writing 14 bytes into a region of size 2 \
[-Werror=format-truncation=]
snprintf (buf, buflen, "Unknown error %d", errnum);
~~^~~~~~~~~~~~
In file included from /usr/include/stdio.h:862,
from ./stdio.h:43,
from strerror_r.c:29:
/usr/include/bits/stdio2.h:64:10: note: '__builtin___snprintf_chk' \
output between 16 and 26 bytes into a destination of size 2
return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 1f05a7e..361d877 100644 --- a/configure.ac +++ b/configure.ac @@ -177,6 +177,7 @@ if test "$gl_gcc_warnings" = yes; then # Remove the following and save the result in GNULIB_WARN_CFLAGS. nw= nw="$nw -Wstrict-overflow" + nw="$nw -Wformat-truncation=2" nw="$nw -Wuninitialized" nw="$nw -Wunused-macros" nw="$nw -Wmissing-prototypes" |