diff options
author | teor <teor2345@gmail.com> | 2017-09-19 16:32:47 +1000 |
---|---|---|
committer | teor <teor2345@gmail.com> | 2017-09-19 16:32:47 +1000 |
commit | e77ece3b31e9e16d576f28e6f19b3c74599b2b1c (patch) | |
tree | 487316df5db5b1419e69c169e89841c73297c854 | |
parent | 6afc924d7e719599a9ad332a102ca1122c82faef (diff) | |
download | tor-e77ece3b31e9e16d576f28e6f19b3c74599b2b1c.tar.gz tor-e77ece3b31e9e16d576f28e6f19b3c74599b2b1c.zip |
Avoid a compilation warning on macOS in scheduler_ev_add()
This warning is caused by a different tv_usec data type on macOS
compared to the system on which the patch was developed.
Fixes 23575 on 0.3.2.1-alpha.
-rw-r--r-- | changes/bug23575 | 4 | ||||
-rw-r--r-- | src/or/scheduler.c | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/changes/bug23575 b/changes/bug23575 new file mode 100644 index 0000000000..2e63e6d6cf --- /dev/null +++ b/changes/bug23575 @@ -0,0 +1,4 @@ + o Minor bugfixes (scheduler): + - Avoid a compilation warning on macOS in scheduler_ev_add() caused by + a different tv_usec data type. + Fixes 23575 on 0.3.2.1-alpha. diff --git a/src/or/scheduler.c b/src/or/scheduler.c index 43fff2bf2b..ca3cafd9af 100644 --- a/src/or/scheduler.c +++ b/src/or/scheduler.c @@ -508,7 +508,7 @@ scheduler_ev_add(const struct timeval *next_run) tor_assert(next_run); if (BUG(event_add(run_sched_ev, next_run) < 0)) { log_warn(LD_SCHED, "Adding to libevent failed. Next run time was set to: " - "%ld.%06ld", next_run->tv_sec, next_run->tv_usec); + "%ld.%06ld", next_run->tv_sec, (long)next_run->tv_usec); return; } } |