From 0a71d1c6a7289cbadcef5f4a28dd94307decc5be Mon Sep 17 00:00:00 2001 From: Sebastian Hahn Date: Tue, 1 Sep 2009 05:23:47 +0200 Subject: Fix compile warnings on Snow Leopard Big thanks to nickm and arma for helping me with this! --- src/or/geoip.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/or/geoip.c') diff --git a/src/or/geoip.c b/src/or/geoip.c index befc3d9e06..00e608214c 100644 --- a/src/or/geoip.c +++ b/src/or/geoip.c @@ -340,7 +340,7 @@ geoip_determine_shares(time_t now) ((double) (now - last_time_determined_shares)); v3_share_times_seconds += v3_share * ((double) (now - last_time_determined_shares)); - share_seconds += now - last_time_determined_shares; + share_seconds += (int)(now - last_time_determined_shares); } last_time_determined_shares = now; } @@ -768,7 +768,7 @@ geoip_get_dirreq_history(geoip_client_action_t action, time_diff = 1; /* Avoid DIV/0; "instant" answers are impossible * by law of nature or something, but a milisecond * is a bit greater than "instantly" */ - bytes_per_second = 1000 * ent->response_size / time_diff; + bytes_per_second = (uint32_t)(1000 * ent->response_size / time_diff); dltimes[ent_sl_idx] = bytes_per_second; } SMARTLIST_FOREACH_END(ent); median_uint32(dltimes, complete); /* sorts as a side effect. */ -- cgit v1.2.3-54-g00ecf