summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorJim Meyering <meyering@fb.com>2017-08-12 13:51:19 -0700
committerJim Meyering <meyering@fb.com>2017-08-12 13:51:19 -0700
commit96101eef33b2a56bd169560cd806b4b3237d2430 (patch)
tree434463cb9c56e07f0ddde29ff85bb35e21e1807a /configure.ac
parent0b7fababf893803505e0382f71dc755951c98cc8 (diff)
downloadcoreutils-96101eef33b2a56bd169560cd806b4b3237d2430.tar.gz
build: adjust warning options to work with latest GCC
* configure.ac: Disable some new warnings to avoid false positives. Building with warnings enabled and latest gcc would evoke build failure without these changes. Disable the following in coreutils proper: -Wformat-overflow=2 -Wformat-truncation=2, and disable these for gnulib: -Wformat-truncation=2 -Wduplicated-branches
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac4
1 files changed, 4 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 7c7c8c238..73e445d02 100644
--- a/configure.ac
+++ b/configure.ac
@@ -133,6 +133,8 @@ if test "$gl_gcc_warnings" = yes; then
nw="$nw -Wswitch-default" # Too many warnings for now
nw="$nw -Wstack-protector" # not worth working around
nw="$nw -Wtype-limits" # False alarms for portable code
+ nw="$nw -Wformat-overflow=2" # False alarms due to GCC bug 80776
+ nw="$nw -Wformat-truncation=2" # False alarm in ls.c, probably related
# things I might fix soon:
nw="$nw -Wfloat-equal" # sort.c, seq.c
nw="$nw -Wmissing-format-attribute" # copy.c
@@ -193,6 +195,8 @@ if test "$gl_gcc_warnings" = yes; then
# We use a slightly smaller set of warning options for lib/.
# Remove the following and save the result in GNULIB_WARN_CFLAGS.
nw=
+ nw="$nw -Wduplicated-branches" # Too many false alarms
+ nw="$nw -Wformat-truncation=2"
nw="$nw -Wstrict-overflow"
nw="$nw -Wuninitialized"
nw="$nw -Wunused-macros"