From f2f729e26b93fe42aeac0c0f99bf9ea8dc62591b Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Tue, 12 Sep 2017 17:46:09 -0400 Subject: Clear up dead-assignment warnings from scan-build --- src/test/test_dir.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/test/test_dir.c') diff --git a/src/test/test_dir.c b/src/test/test_dir.c index dd910cd0c5..896e16ce05 100644 --- a/src/test/test_dir.c +++ b/src/test/test_dir.c @@ -2252,6 +2252,7 @@ test_dir_networkstatus_compute_bw_weights_v10(void *arg) tt_i64_op(G+M+E+D, OP_EQ, T); ret = networkstatus_compute_bw_weights_v10(chunks, G, M, E, D, T, weight_scale); + tt_assert(ret); tt_str_op(smartlist_get(chunks, 0), OP_EQ, "bandwidth-weights Wbd=883 Wbe=0 " "Wbg=3673 Wbm=10000 Wdb=10000 Web=10000 Wed=8233 Wee=10000 Weg=8233 " "Wem=10000 Wgb=10000 Wgd=883 Wgg=6327 Wgm=6327 Wmb=10000 Wmd=883 Wme=0 " @@ -2268,6 +2269,7 @@ test_dir_networkstatus_compute_bw_weights_v10(void *arg) tt_i64_op(G+M+E+D, OP_EQ, T); ret = networkstatus_compute_bw_weights_v10(chunks, G, M, E, D, T, weight_scale); + tt_assert(ret); tt_str_op(smartlist_get(chunks, 0), OP_EQ, "bandwidth-weights Wbd=0 Wbe=0 " "Wbg=4194 Wbm=10000 Wdb=10000 Web=10000 Wed=10000 Wee=10000 Weg=10000 " "Wem=10000 Wgb=10000 Wgd=0 Wgg=5806 Wgm=5806 Wmb=10000 Wmd=0 Wme=0 " @@ -2284,6 +2286,7 @@ test_dir_networkstatus_compute_bw_weights_v10(void *arg) tt_i64_op(G+M+E+D, OP_EQ, T); ret = networkstatus_compute_bw_weights_v10(chunks, G, M, E, D, T, weight_scale); + tt_assert(ret); tt_str_op(smartlist_get(chunks, 0), OP_EQ, "bandwidth-weights Wbd=317 " "Wbe=5938 Wbg=0 Wbm=10000 Wdb=10000 Web=10000 Wed=9366 Wee=4061 " "Weg=9366 Wem=4061 Wgb=10000 Wgd=317 Wgg=10000 Wgm=10000 Wmb=10000 " @@ -2304,6 +2307,7 @@ test_dir_networkstatus_compute_bw_weights_v10(void *arg) "Wbe=0 Wbg=0 Wbm=10000 Wdb=10000 Web=10000 Wed=3333 Wee=10000 Weg=3333 " "Wem=10000 Wgb=10000 Wgd=3333 Wgg=10000 Wgm=10000 Wmb=10000 Wmd=3333 " "Wme=0 Wmg=0 Wmm=10000\n"); + tt_assert(ret); done: SMARTLIST_FOREACH(chunks, char *, cp, tor_free(cp)); -- cgit v1.2.3-54-g00ecf