diff options
author | Nick Mathewson <nickm@torproject.org> | 2016-05-30 13:57:32 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2016-06-11 10:11:52 -0400 |
commit | 8f2d2933f912c9952453b17b19636c26579e2323 (patch) | |
tree | 2165851a39ac9517d9328481e230490ddc47f421 /src/or | |
parent | 493499a3399f8a8532b4b2a80006c033e8f64c58 (diff) | |
download | tor-8f2d2933f912c9952453b17b19636c26579e2323.tar.gz tor-8f2d2933f912c9952453b17b19636c26579e2323.zip |
Use -Wdouble-promotion in GCC >= 4.6
This warning triggers on silently promoting a float to a double. In
our code, it's just a sign that somebody used a float by mistake,
since we always prefer double.
Diffstat (limited to 'src/or')
-rw-r--r-- | src/or/channel.c | 2 | ||||
-rw-r--r-- | src/or/channeltls.c | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/or/channel.c b/src/or/channel.c index 75b16d707f..3b818396b9 100644 --- a/src/or/channel.c +++ b/src/or/channel.c @@ -4524,7 +4524,7 @@ channel_update_xmit_queue_size(channel_t *chan) /* Next, adjust by the overhead factor, if any is available */ if (chan->get_overhead_estimate) { overhead = chan->get_overhead_estimate(chan); - if (overhead >= 1.0f) { + if (overhead >= 1.0) { queued = (uint64_t)(queued * overhead); } else { /* Ignore silly overhead factors */ diff --git a/src/or/channeltls.c b/src/or/channeltls.c index 293f01070b..a7de98625e 100644 --- a/src/or/channeltls.c +++ b/src/or/channeltls.c @@ -462,7 +462,8 @@ channel_tls_get_overhead_estimate_method(channel_t *chan) * Never estimate more than 2.0; otherwise we get silly large estimates * at the very start of a new TLS connection. */ - if (overhead > 2.0f) overhead = 2.0f; + if (overhead > 2.0) + overhead = 2.0; } log_debug(LD_CHANNEL, |