From 935a7fcdd8c14ff8d9296735681109f243816a93 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Fri, 24 Mar 2017 02:07:14 +0000 Subject: [PATCH] memcheck/tests/unit_oset.c: Fix compiler warnings Avoid that the compiler warns about using the result of an assignment as a truth value. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16286 --- memcheck/tests/unit_oset.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/memcheck/tests/unit_oset.c b/memcheck/tests/unit_oset.c index eb7b34fc7..ff93398ae 100644 --- a/memcheck/tests/unit_oset.c +++ b/memcheck/tests/unit_oset.c @@ -208,7 +208,8 @@ void example1singleset(OSet* oset, char *descr) // Check that we can remove half of the elements, and that their values // are as expected. for (i = 0; i < NN; i += 2) { - assert( pv = VG_(OSetGen_Remove)(oset, vs[i]) ); + pv = VG_(OSetGen_Remove)(oset, vs[i]); + assert( pv ); assert( pv == vs[i] ); } @@ -217,7 +218,8 @@ void example1singleset(OSet* oset, char *descr) // Check we can find the remaining elements (with the right values). for (i = 1; i < NN; i += 2) { - assert( pv = VG_(OSetGen_LookupWithCmp)(oset, vs[i], NULL) ); + pv = VG_(OSetGen_LookupWithCmp)(oset, vs[i], NULL); + assert( pv ); assert( pv == vs[i] ); } @@ -229,7 +231,8 @@ void example1singleset(OSet* oset, char *descr) // Check that we can remove the remaining half of the elements, and that // their values are as expected. for (i = 1; i < NN; i += 2) { - assert( pv = VG_(OSetGen_Remove)(oset, vs[i]) ); + pv = VG_(OSetGen_Remove)(oset, vs[i]); + assert( pv ); assert( pv == vs[i] ); } -- 2.11.4.GIT