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/test/test_channel.c | |
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/test/test_channel.c')
-rw-r--r-- | src/test/test_channel.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/test/test_channel.c b/src/test/test_channel.c index 846e419fea..79bc5ac949 100644 --- a/src/test/test_channel.c +++ b/src/test/test_channel.c @@ -33,7 +33,7 @@ static int test_destroy_not_pending_calls = 0; static int test_doesnt_want_writes_count = 0; static int test_dumpstats_calls = 0; static int test_has_waiting_cells_count = 0; -static double test_overhead_estimate = 1.0f; +static double test_overhead_estimate = 1.0; static int test_releases_count = 0; static circuitmux_t *test_target_cmux = NULL; static unsigned int test_cmux_cells = 0; @@ -792,7 +792,7 @@ test_channel_incoming(void *arg) /* Accept cells to lower layer */ test_chan_accept_cells = 1; /* Use default overhead factor */ - test_overhead_estimate = 1.0f; + test_overhead_estimate = 1.0; ch = new_fake_channel(); tt_assert(ch); @@ -881,7 +881,7 @@ test_channel_lifecycle(void *arg) /* Accept cells to lower layer */ test_chan_accept_cells = 1; /* Use default overhead factor */ - test_overhead_estimate = 1.0f; + test_overhead_estimate = 1.0; ch1 = new_fake_channel(); tt_assert(ch1); @@ -989,7 +989,7 @@ test_channel_lifecycle_2(void *arg) /* Accept cells to lower layer */ test_chan_accept_cells = 1; /* Use default overhead factor */ - test_overhead_estimate = 1.0f; + test_overhead_estimate = 1.0; ch = new_fake_channel(); tt_assert(ch); @@ -1136,7 +1136,7 @@ test_channel_multi(void *arg) /* Accept cells to lower layer */ test_chan_accept_cells = 1; /* Use default overhead factor */ - test_overhead_estimate = 1.0f; + test_overhead_estimate = 1.0; ch1 = new_fake_channel(); tt_assert(ch1); @@ -1444,7 +1444,7 @@ test_channel_queue_incoming(void *arg) /* Accept cells to lower layer */ test_chan_accept_cells = 1; /* Use default overhead factor */ - test_overhead_estimate = 1.0f; + test_overhead_estimate = 1.0; ch = new_fake_channel(); tt_assert(ch); @@ -1589,11 +1589,11 @@ test_channel_queue_size(void *arg) channel_update_xmit_queue_size(ch); tt_u64_op(ch->bytes_queued_for_xmit, ==, 512); /* Now try a larger one */ - test_overhead_estimate = 2.0f; + test_overhead_estimate = 2.0; channel_update_xmit_queue_size(ch); tt_u64_op(ch->bytes_queued_for_xmit, ==, 1024); /* Go back to 1.0 */ - test_overhead_estimate = 1.0f; + test_overhead_estimate = 1.0; channel_update_xmit_queue_size(ch); tt_u64_op(ch->bytes_queued_for_xmit, ==, 512); /* Check the global estimate too */ |