diff options
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/time/tvdiff.c | 10 | ||||
-rw-r--r-- | src/lib/wallclock/tm_cvt.c | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/time/tvdiff.c b/src/lib/time/tvdiff.c index 0af45a208b..cfd1ace771 100644 --- a/src/lib/time/tvdiff.c +++ b/src/lib/time/tvdiff.c @@ -52,14 +52,14 @@ tv_udiff(const struct timeval *start, const struct timeval *end) if (start->tv_usec > TOR_USEC_PER_SEC || start->tv_usec < 0) { log_warn(LD_GENERAL, "comparing times on microsecond detail with bad " "start tv_usec: %"PRId64 " microseconds", - (start->tv_usec)); + (int64_t)start->tv_usec); return LONG_MAX; } if (end->tv_usec > TOR_USEC_PER_SEC || end->tv_usec < 0) { log_warn(LD_GENERAL, "comparing times on microsecond detail with bad " "end tv_usec: %"PRId64 " microseconds", - (end->tv_usec)); + (int64_t)end->tv_usec); return LONG_MAX; } @@ -101,14 +101,14 @@ tv_mdiff(const struct timeval *start, const struct timeval *end) if (start->tv_usec > TOR_USEC_PER_SEC || start->tv_usec < 0) { log_warn(LD_GENERAL, "comparing times on millisecond detail with bad " "start tv_usec: %"PRId64 " microseconds", - (start->tv_usec)); + (int64_t)start->tv_usec); return LONG_MAX; } if (end->tv_usec > TOR_USEC_PER_SEC || end->tv_usec < 0) { log_warn(LD_GENERAL, "comparing times on millisecond detail with bad " "end tv_usec: %"PRId64 " microseconds", - (end->tv_usec)); + (int64_t)end->tv_usec); return LONG_MAX; } @@ -124,7 +124,7 @@ tv_mdiff(const struct timeval *start, const struct timeval *end) if (secdiff > (int64_t)(LONG_MAX/1000 - 2) || secdiff < (int64_t)(LONG_MIN/1000 + 1)) { log_warn(LD_GENERAL, "comparing times on millisecond detail too far " - "apart: %"PRId64 " seconds", (secdiff)); + "apart: %"PRId64 " seconds", (int64_t)secdiff); return LONG_MAX; } diff --git a/src/lib/wallclock/tm_cvt.c b/src/lib/wallclock/tm_cvt.c index 0a1a1cd438..31d929e635 100644 --- a/src/lib/wallclock/tm_cvt.c +++ b/src/lib/wallclock/tm_cvt.c @@ -102,7 +102,7 @@ correct_tm(int islocal, const time_t *timep, struct tm *resultbuf, if (err_out) { tor_asprintf(err_out, "%s(%"PRId64") failed with error %s: %s", islocal?"localtime":"gmtime", - timep?(*timep):0, + timep?((int64_t)*timep):0, strerror(errno), outcome); } |