summaryrefslogtreecommitdiff
path: root/src/ext
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-04-14 20:13:34 -0400
committerNick Mathewson <nickm@torproject.org>2016-05-09 14:04:54 -0400
commit10fd4535c2109c9532585aca2c429f741937364c (patch)
tree7b234a407921c9861fa0ae99726c92328b617ed2 /src/ext
parent118556e4b32c30d91c2d132c5f8d3cb8e551fafc (diff)
downloadtor-10fd4535c2109c9532585aca2c429f741937364c.tar.gz
tor-10fd4535c2109c9532585aca2c429f741937364c.zip
Fix an OSX/clang compilation warning
Diffstat (limited to 'src/ext')
-rw-r--r--src/ext/timeouts/timeout.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ext/timeouts/timeout.c b/src/ext/timeouts/timeout.c
index dbc24fa00a..f528576ffb 100644
--- a/src/ext/timeouts/timeout.c
+++ b/src/ext/timeouts/timeout.c
@@ -300,7 +300,7 @@ TIMEOUT_PUBLIC void timeouts_del(struct timeouts *T, struct timeout *to) {
if (to->pending != &T->expired && TAILQ_EMPTY(to->pending)) {
ptrdiff_t index = to->pending - &T->wheel[0][0];
- int wheel = index / WHEEL_LEN;
+ int wheel = (int) (index / WHEEL_LEN);
int slot = index % WHEEL_LEN;
T->pending[wheel] &= ~(WHEEL_C(1) << slot);
@@ -435,7 +435,7 @@ TIMEOUT_PUBLIC void timeouts_update(struct timeouts *T, abstime_t curtime) {
pending = rotl(((UINT64_C(1) << _elapsed) - 1), oslot);
nslot = WHEEL_MASK & (curtime >> (wheel * WHEEL_BIT));
- pending |= rotr(rotl(((WHEEL_C(1) << _elapsed) - 1), nslot), _elapsed);
+ pending |= rotr(rotl(((WHEEL_C(1) << _elapsed) - 1), nslot), (int)_elapsed);
pending |= WHEEL_C(1) << nslot;
}