diff options
author | Thomas Haller <thaller@redhat.com> | 2017-02-06 14:52:51 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2017-02-06 16:53:37 +0100 |
commit | b4a79ebdc40a9f950638ce8b97021ab1ca4a4078 (patch) | |
tree | 0a5e75419ef54ebadb7d7eb3a759eaf70bdc7f36 /m4 | |
parent | 7722beaa7e62be70cced974c0b4107b130e391e6 (diff) |
build: disable -Wformat-truncation warning
The warning seems questionable and overly strict.
For now, just disable it to allow building with gcc7.
src/systemd/src/basic/time-util.c: In function ‘format_timespan’:
src/systemd/src/basic/time-util.c:509:46: error: ‘%0*lu’ directive output between 1 and 2147483648 bytes may cause result to exceed ‘INT_MAX’ [-Werror=format-truncation=]
"%s"USEC_FMT".%0*"PRI_USEC"%s",
^~~~
src/systemd/src/basic/time-util.c:509:60: note: format string is defined here
"%s"USEC_FMT".%0*"PRI_USEC"%s",
src/systemd/src/basic/time-util.c:509:46: note: directive argument in the range [0, 18446744073709551614]
"%s"USEC_FMT".%0*"PRI_USEC"%s",
^~~~
https://mail.gnome.org/archives/networkmanager-list/2017-February/msg00001.html
Diffstat (limited to 'm4')
-rw-r--r-- | m4/compiler_options.m4 | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/m4/compiler_options.m4 b/m4/compiler_options.m4 index 4a1130598..5f0464453 100644 --- a/m4/compiler_options.m4 +++ b/m4/compiler_options.m4 @@ -82,6 +82,7 @@ if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then -Wformat-nonliteral \ -Wmissing-include-dirs \ -Wno-pragmas \ + -Wno-format-truncation \ ; do dnl GCC 4.4 does not warn when checking for -Wno-* flags (https://gcc.gnu.org/wiki/FAQ#wnowarning) _NM_COMPILER_FLAG([$(printf '%s' "$option" | sed 's/^-Wno-/-W/')], [], |