log.c: fix compiler warning
log.c:94:87: warning: format specifies type 'long' but the argument has type 'int' [-Wformat] ...%03ld ", (unsigned long)pthread_self(), time_string, tv.tv_usec / 1000); ~~~~~ ^~~~~~~~~~~~~~~~~ %03d
This commit is contained in:
parent
f29f2e62b3
commit
08529c91ee
|
@ -91,7 +91,7 @@ static void sc_do_log_va(sc_context_t *ctx, int level, const char *file, int lin
|
|||
gettimeofday (&tv, NULL);
|
||||
tm = localtime (&tv.tv_sec);
|
||||
strftime (time_string, sizeof(time_string), "%H:%M:%S", tm);
|
||||
r = snprintf(p, left, "0x%lx %s.%03ld ", (unsigned long)pthread_self(), time_string, tv.tv_usec / 1000);
|
||||
r = snprintf(p, left, "0x%lx %s.%03ld ", (unsigned long)pthread_self(), time_string, (long)tv.tv_usec / 1000);
|
||||
#endif
|
||||
p += r;
|
||||
left -= r;
|
||||
|
|
Loading…
Reference in New Issue