Merge pull request #9156 from shr-project/jansa/gcc8

time-util: fix build with gcc8 -Werror=format-truncation=
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2018-06-02 16:18:59 +02:00
committed by GitHub
2 changed files with 31 additions and 2 deletions

View File

@@ -484,7 +484,7 @@ char *format_timespan(char *buf, size_t l, usec_t t, usec_t accuracy) {
/* Let's see if we should shows this in dot notation */
if (t < USEC_PER_MINUTE && b > 0) {
usec_t cc;
int j;
signed char j;
j = 0;
for (cc = table[i].usec; cc > 1; cc /= 10)