diff options
author | Nick Mathewson <nickm@torproject.org> | 2017-09-12 17:46:09 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-09-12 21:32:34 -0400 |
commit | f2f729e26b93fe42aeac0c0f99bf9ea8dc62591b (patch) | |
tree | a9073ba994607080d71687e04b67f34b76f25528 /src/test/test_util.c | |
parent | db00f24d8be848f5840af913e88d5ae7019c70f6 (diff) | |
download | tor-f2f729e26b93fe42aeac0c0f99bf9ea8dc62591b.tar.gz tor-f2f729e26b93fe42aeac0c0f99bf9ea8dc62591b.zip |
Clear up dead-assignment warnings from scan-build
Diffstat (limited to 'src/test/test_util.c')
-rw-r--r-- | src/test/test_util.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/test/test_util.c b/src/test/test_util.c index 6e54c8bf52..6bed23fc7b 100644 --- a/src/test/test_util.c +++ b/src/test/test_util.c @@ -2179,10 +2179,13 @@ test_util_parse_integer(void *arg) tt_int_op(1,OP_EQ, i); tt_assert(DBL_TO_U64(d) == 0); d = tor_parse_double(" ", 0, (double)UINT64_MAX,&i,NULL); + tt_double_op(fabs(d), OP_LT, 1e-10); tt_int_op(0,OP_EQ, i); d = tor_parse_double(".0a", 0, (double)UINT64_MAX,&i,NULL); + tt_double_op(fabs(d), OP_LT, 1e-10); tt_int_op(0,OP_EQ, i); d = tor_parse_double(".0a", 0, (double)UINT64_MAX,&i,&cp); + tt_double_op(fabs(d), OP_LT, 1e-10); tt_int_op(1,OP_EQ, i); d = tor_parse_double("-.0", 0, (double)UINT64_MAX,&i,NULL); tt_int_op(1,OP_EQ, i); |