aboutsummaryrefslogtreecommitdiff
path: root/src/common
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/common
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/common')
-rw-r--r--src/common/util.c2
1 files changed, 1 insertions, 1 deletions
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. */