summaryrefslogtreecommitdiff
path: root/src/or/routerlist.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-05-30 12:54:31 -0400
committerNick Mathewson <nickm@torproject.org>2016-06-11 10:11:52 -0400
commit493499a3399f8a8532b4b2a80006c033e8f64c58 (patch)
treefb1965c627838137ecd4634fba00cbcccd253372 /src/or/routerlist.c
parent2ff20c93a5ec753a0c46ca5ecd991b8e2020f7d0 (diff)
downloadtor-493499a3399f8a8532b4b2a80006c033e8f64c58.tar.gz
tor-493499a3399f8a8532b4b2a80006c033e8f64c58.zip
Add -Wfloat-conversion for GCC >= 4.9
This caught quite a few minor issues in our unit tests and elsewhere in our code.
Diffstat (limited to 'src/or/routerlist.c')
-rw-r--r--src/or/routerlist.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/or/routerlist.c b/src/or/routerlist.c
index 4d9d249d10..abd97bbb96 100644
--- a/src/or/routerlist.c
+++ b/src/or/routerlist.c
@@ -2178,7 +2178,7 @@ scale_array_elements_to_u64(uint64_t *entries_out, const double *entries_in,
double scale_factor = 0.0;
int i;
/* big, but far away from overflowing an int64_t */
-#define SCALE_TO_U64_MAX ((int64_t) (INT64_MAX / 4))
+#define SCALE_TO_U64_MAX ((double) (INT64_MAX / 4))
for (i = 0; i < n_entries; ++i)
total += entries_in[i];