summaryrefslogtreecommitdiff
path: root/src/or/dirserv.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/dirserv.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/dirserv.c')
-rw-r--r--src/or/dirserv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/or/dirserv.c b/src/or/dirserv.c
index 2d623a655a..aedd092522 100644
--- a/src/or/dirserv.c
+++ b/src/or/dirserv.c
@@ -2507,7 +2507,7 @@ dirserv_read_measured_bandwidths(const char *from_file,
}
line[strlen(line)-1] = '\0';
- file_time = tor_parse_ulong(line, 10, 0, ULONG_MAX, &ok, NULL);
+ file_time = (time_t)tor_parse_ulong(line, 10, 0, ULONG_MAX, &ok, NULL);
if (!ok) {
log_warn(LD_DIRSERV, "Non-integer time in bandwidth file: %s",
escaped(line));