From: Bart Van Assche Date: Fri, 24 Mar 2017 02:07:14 +0000 (+0000) Subject: memcheck/tests/unit_oset.c: Fix compiler warnings X-Git-Tag: svn/VALGRIND_3_13_0~145 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=935a7fcdd8c14ff8d9296735681109f243816a93;p=thirdparty%2Fvalgrind.git 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 --- diff --git a/memcheck/tests/unit_oset.c b/memcheck/tests/unit_oset.c index eb7b34fc70..ff93398ae8 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] ); }