From: Bart Van Assche Date: Sun, 4 May 2008 08:10:24 +0000 (+0000) Subject: Fixed compiler warnings. X-Git-Tag: svn/VALGRIND_3_4_0~633 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6e2e200228fd73cebba58218975ba769724846f2;p=thirdparty%2Fvalgrind.git Fixed compiler warnings. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8004 --- diff --git a/memcheck/tests/oset_test.c b/memcheck/tests/oset_test.c index 4bf6686b1a..3954f7304c 100644 --- a/memcheck/tests/oset_test.c +++ b/memcheck/tests/oset_test.c @@ -45,6 +45,11 @@ static UInt myrandom( void ) return seed; } +static void* allocate_node(SizeT szB) +{ return malloc(szB); } + +static void free_node(void* p) +{ return free(p); } //--------------------------------------------------------------------------- @@ -78,8 +83,8 @@ void example1(void) // Create a static OSet of Ints. This one uses fast (built-in) // comparisons. OSet* oset = VG_(OSetGen_Create)(0, - NULL, - malloc, free); + NULL, + allocate_node, free_node); // Try some operations on an empty OSet to ensure they don't screw up. vg_assert( ! VG_(OSetGen_Contains)(oset, &v) ); @@ -212,7 +217,7 @@ void example1b(void) // Create a static OSet of Ints. This one uses fast (built-in) // comparisons. - OSet* oset = VG_(OSetWord_Create)(malloc, free); + OSet* oset = VG_(OSetWord_Create)(allocate_node, free_node); // Try some operations on an empty OSet to ensure they don't screw up. vg_assert( ! VG_(OSetWord_Contains)(oset, v) ); @@ -370,7 +375,7 @@ void example2(void) // comparisons. OSet* oset = VG_(OSetGen_Create)(offsetof(Block, first), blockCmp, - malloc, free); + allocate_node, free_node); // Try some operations on an empty OSet to ensure they don't screw up. vg_assert( ! VG_(OSetGen_Contains)(oset, &v) );