CONTRIB: tcploop: fix time format to silence build warnings

timeval doesn't necessarily have ints for tv_sec/tv_usec, let's cast
them.
This commit is contained in:
Willy Tarreau 2017-03-14 14:37:13 +01:00
parent 0c0c0a6c26
commit 752cc49728
1 changed files with 2 additions and 2 deletions

View File

@ -171,10 +171,10 @@ void dolog(const char *format, ...)
tv.tv_sec = 0;
tv.tv_usec = 0;
}
fprintf(stderr, "[%d.%06d] ", tv.tv_sec, tv.tv_usec);
fprintf(stderr, "[%d.%06d] ", (int)tv.tv_sec, (int)tv.tv_usec);
break;
default: // [sec.usec] absolute
fprintf(stderr, "[%d.%06d] ", date.tv_sec, date.tv_usec);
fprintf(stderr, "[%d.%06d] ", (int)date.tv_sec, (int)date.tv_usec);
break;
}
}