Use long long in format strings for time_t

This commit is contained in:
Pierre Pronchery 2018-01-18 04:02:47 +01:00
parent a126e50610
commit 2596b14473

View File

@ -230,8 +230,8 @@ static int _loop_timeout(Event * event)
i++; i++;
} }
#ifdef DEBUG #ifdef DEBUG
fprintf(stderr, "DEBUG: %s() %s%ld%s%ld => 0\n", __func__, "tv_sec=", fprintf(stderr, "DEBUG: %s() %s%lld%s%ld => 0\n", __func__, "tv_sec=",
(long)event->timeout.tv_sec, ", tv_usec=", (long long)event->timeout.tv_sec, ", tv_usec=",
(long)event->timeout.tv_usec); (long)event->timeout.tv_usec);
#endif #endif
return 0; return 0;
@ -357,8 +357,8 @@ int event_register_timeout(Event * event, struct timeval * timeout,
&& event->timeout.tv_usec > timeout->tv_usec)) && event->timeout.tv_usec > timeout->tv_usec))
{ {
#ifdef DEBUG #ifdef DEBUG
fprintf(stderr, "DEBUG: %s%s%ld%s%ld%s", __func__, "() tv_sec=", fprintf(stderr, "DEBUG: %s%s%lld%s%ld%s", __func__, "() tv_sec=",
(long)timeout->tv_sec, ", tv_usec=", (long long)timeout->tv_sec, ", tv_usec=",
(long)timeout->tv_usec, "\n"); (long)timeout->tv_usec, "\n");
#endif #endif
event->timeout.tv_sec = timeout->tv_sec; event->timeout.tv_sec = timeout->tv_sec;