diff options
author | dana koch <dsk@google.com> | 2014-05-12 09:16:06 +1000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2014-05-11 23:36:00 -0400 |
commit | d6e6c63baf4409766ffd82fc859187b6285b093f (patch) | |
tree | 0a38dfcecc034cc33348a238cc0a210d840f2e67 /src/test | |
parent | de2010e9c229cb130c30659aa62122529c125637 (diff) | |
download | tor-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/test')
-rw-r--r-- | src/test/test_util.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/test_util.c b/src/test/test_util.c index d66be32a79..65cc58a66b 100644 --- a/src/test/test_util.c +++ b/src/test/test_util.c @@ -344,7 +344,7 @@ test_util_time(void) tv.tv_sec = (time_t)1326296338; tv.tv_usec = 3060; - format_iso_time(timestr, tv.tv_sec); + format_iso_time(timestr, (time_t)tv.tv_sec); test_streq("2012-01-11 15:38:58", timestr); /* The output of format_local_iso_time will vary by timezone, and setting our timezone for testing purposes would be a nontrivial flaky pain. @@ -352,7 +352,7 @@ test_util_time(void) format_local_iso_time(timestr, tv.tv_sec); test_streq("2012-01-11 10:38:58", timestr); */ - format_iso_time_nospace(timestr, tv.tv_sec); + format_iso_time_nospace(timestr, (time_t)tv.tv_sec); test_streq("2012-01-11T15:38:58", timestr); test_eq(strlen(timestr), ISO_TIME_LEN); format_iso_time_nospace_usec(timestr, &tv); |