From 493499a3399f8a8532b4b2a80006c033e8f64c58 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Mon, 30 May 2016 12:54:31 -0400 Subject: Add -Wfloat-conversion for GCC >= 4.9 This caught quite a few minor issues in our unit tests and elsewhere in our code. --- src/common/util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/common') diff --git a/src/common/util.c b/src/common/util.c index 925431d181..1546fd123d 100644 --- a/src/common/util.c +++ b/src/common/util.c @@ -5530,7 +5530,7 @@ clamp_double_to_int64(double number) * representable integer for which this is not the case is INT64_MIN, but * it is covered by the logic below. */ if (isfinite(number) && exp <= 63) { - return number; + return (int64_t)number; } /* Handle infinities and finite numbers with magnitude >= 2^63. */ -- cgit v1.2.3-54-g00ecf