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;
}
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;
}
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;
}
" (%"PRIu64 " seconds ago) "
"and last active at %"PRIu64 " (%"PRIu64 " seconds ago)",
(chan->global_identifier),
- (chan->timestamp_created),
- (now - chan->timestamp_created),
- (chan->timestamp_active),
- (now - chan->timestamp_active));
+ (uint64_t)(chan->timestamp_created),
+ (uint64_t)(now - chan->timestamp_created),
+ (uint64_t)(chan->timestamp_active),
+ (uint64_t)(now - chan->timestamp_active));
/* Handle digest. */
if (!tor_digest_is_zero(chan->identity_digest)) {
" * Channel %"PRIu64 " was last used by a "
"client at %"PRIu64 " (%"PRIu64 " seconds ago)",
(chan->global_identifier),
- (chan->timestamp_client),
- (now - chan->timestamp_client));
+ (uint64_t)(chan->timestamp_client),
+ (uint64_t)(now - chan->timestamp_client));
tor_log(severity, LD_GENERAL,
" * Channel %"PRIu64 " last received a cell "
"at %"PRIu64 " (%"PRIu64 " seconds ago)",
(chan->global_identifier),
- (chan->timestamp_recv),
- (now - chan->timestamp_recv));
+ (uint64_t)(chan->timestamp_recv),
+ (uint64_t)(now - chan->timestamp_recv));
tor_log(severity, LD_GENERAL,
" * Channel %"PRIu64 " last transmitted a cell "
"at %"PRIu64 " (%"PRIu64 " seconds ago)",
(chan->global_identifier),
- (chan->timestamp_xmit),
- (now - chan->timestamp_xmit));
+ (uint64_t)(chan->timestamp_xmit),
+ (uint64_t)(now - chan->timestamp_xmit));
/* Describe counters and rates */
tor_log(severity, LD_GENERAL,
" (%"PRIu64 " seconds ago) "
"and last active at %"PRIu64 " (%"PRIu64 " seconds ago)",
(chan_l->global_identifier),
- (chan_l->timestamp_created),
- (now - chan_l->timestamp_created),
- (chan_l->timestamp_active),
- (now - chan_l->timestamp_active));
+ (uint64_t)(chan_l->timestamp_created),
+ (uint64_t)(now - chan_l->timestamp_created),
+ (uint64_t)(chan_l->timestamp_active),
+ (uint64_t)(now - chan_l->timestamp_active));
tor_log(severity, LD_GENERAL,
" * Channel listener %"PRIu64 " last accepted an incoming "
"channel at %"PRIu64 " (%"PRIu64 " seconds ago) "
"and has accepted %"PRIu64 " channels in total",
(chan_l->global_identifier),
- (chan_l->timestamp_accepted),
- (now - chan_l->timestamp_accepted),
- (chan_l->n_accepted));
+ (uint64_t)(chan_l->timestamp_accepted),
+ (uint64_t)(now - chan_l->timestamp_accepted),
+ (uint64_t)(chan_l->n_accepted));
/*
* If it's sensible to do so, get the rate of incoming channels on this
channel_rsa_id_group_set_badness(&(*iter)->channel_list, force);
}
}
-
log_debug(LD_DIR,
"Sent request to directory server '%s:%d': "
- "(purpose: %d, request size: %"PRIu64 ", "
- "payload size: %"PRIu64 ")",
+ "(purpose: %d, request size: %"TOR_PRIuSZ", "
+ "payload size: %"TOR_PRIuSZ")",
conn->base_.address, conn->base_.port,
conn->base_.purpose,
(total_request_len),
tor_log(LOG_DEBUG, LD_DIR,
"Received response from directory server '%s:%d': %d %s "
- "(purpose: %d, response size: %"PRIu64
+ "(purpose: %d, response size: %"TOR_PRIuSZ
#ifdef MEASUREMENTS_21206
", data cells received: %d, data cells sent: %d"
#endif
smartlist_free(fingerprints);
return r;
}
-