summaryrefslogtreecommitdiff
path: root/src/or/circuituse.c
diff options
context:
space:
mode:
authordana koch <dsk@google.com>2014-05-12 09:16:06 +1000
committerNick Mathewson <nickm@torproject.org>2014-05-11 23:36:00 -0400
commitd6e6c63baf4409766ffd82fc859187b6285b093f (patch)
tree0a38dfcecc034cc33348a238cc0a210d840f2e67 /src/or/circuituse.c
parentde2010e9c229cb130c30659aa62122529c125637 (diff)
downloadtor-d6e6c63baf4409766ffd82fc859187b6285b093f.tar.gz
tor-d6e6c63baf4409766ffd82fc859187b6285b093f.zip
Quench clang's complaints with -Wshorten-64-to-32 when time_t is not long.
On OpenBSD 5.4, time_t is a 32-bit integer. These instances contain implicit treatment of long and time_t as comparable types, so explicitly cast to time_t.
Diffstat (limited to 'src/or/circuituse.c')
-rw-r--r--src/or/circuituse.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/or/circuituse.c b/src/or/circuituse.c
index 9d2decf576..467bef652f 100644
--- a/src/or/circuituse.c
+++ b/src/or/circuituse.c
@@ -296,7 +296,7 @@ circuit_get_best(const entry_connection_t *conn,
}
if (!circuit_is_acceptable(origin_circ,conn,must_be_open,purpose,
- need_uptime,need_internal,now.tv_sec))
+ need_uptime,need_internal, (time_t)now.tv_sec))
continue;
/* now this is an acceptable circ to hand back. but that doesn't
@@ -683,9 +683,9 @@ circuit_expire_building(void)
victim->purpose,
circuit_purpose_to_string(victim->purpose));
} else if (circuit_build_times_count_close(
- get_circuit_build_times_mutable(),
- first_hop_succeeded,
- victim->timestamp_created.tv_sec)) {
+ get_circuit_build_times_mutable(),
+ first_hop_succeeded,
+ (time_t)victim->timestamp_created.tv_sec)) {
circuit_build_times_set_timeout(get_circuit_build_times_mutable());
}
}
@@ -825,7 +825,7 @@ circuit_log_ancient_one_hop_circuits(int age)
char created[ISO_TIME_LEN+1];
circ = TO_CIRCUIT(ocirc);
format_local_iso_time(created,
- circ->timestamp_created.tv_sec);
+ (time_t)circ->timestamp_created.tv_sec);
log_notice(LD_HEARTBEAT, " #%d created at %s. %s, %s. %s for close. "
"%s for new conns.",