diff options
author | Martin Jansa <Martin.Jansa@gmail.com> | 2018-06-01 17:22:28 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2018-06-02 10:41:03 +0200 |
commit | 5fd8d5be118c6b52880e99f38f7f5d8be9cb0f23 (patch) | |
tree | 8406fa66534d1d01ba021363533cfe84abe0e8d8 /src/test | |
parent | networkd: enable to set IFF_ALLMULTI to network device (#9146) (diff) | |
download | systemd-5fd8d5be118c6b52880e99f38f7f5d8be9cb0f23.tar.xz systemd-5fd8d5be118c6b52880e99f38f7f5d8be9cb0f23.zip |
time-util: fix build with gcc8 -Werror=format-truncation=
* it fails with gcc8 when -O1 or -Os is used (and -ftree-vrp which is added by -O2 and higher isn't used)
../git/src/basic/time-util.c: In function 'format_timespan':
../git/src/basic/time-util.c:508:46: error: '%0*llu' directive output between 1 and 2147483647 bytes may cause result to exceed 'INT_MAX' [-Werror=format-truncation=]
"%s"USEC_FMT".%0*"PRI_USEC"%s",
^~~~
../git/src/basic/time-util.c:508:60: note: format string is defined here
"%s"USEC_FMT".%0*"PRI_USEC"%s",
../git/src/basic/time-util.c:508:46: note: directive argument in the range [0, 18446744073709551614]
"%s"USEC_FMT".%0*"PRI_USEC"%s",
^~~~
../git/src/basic/time-util.c:507:37: note: 'snprintf' output 4 or more bytes (assuming 2147483651) into a destination of size 4294967295
k = snprintf(p, l,
^~~~~~~~~~~~~~
"%s"USEC_FMT".%0*"PRI_USEC"%s",
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
p > buf ? " " : "",
~~~~~~~~~~~~~~~~~~~
a,
~~
j,
~~
b,
~~
table[i].suffix);
~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
[zj: change 'char' to 'signed char']
Diffstat (limited to 'src/test')
0 files changed, 0 insertions, 0 deletions