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:
parent
0c0c0a6c26
commit
752cc49728
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue