|
From: <sv...@va...> - 2008-05-04 08:14:20
|
Author: bart
Date: 2008-05-04 09:10:24 +0100 (Sun, 04 May 2008)
New Revision: 8004
Log:
Fixed compiler warnings.
Modified:
trunk/memcheck/tests/oset_test.c
Modified: trunk/memcheck/tests/oset_test.c
===================================================================
--- trunk/memcheck/tests/oset_test.c 2008-05-04 08:09:44 UTC (rev 8003)
+++ trunk/memcheck/tests/oset_test.c 2008-05-04 08:10:24 UTC (rev 8004)
@@ -45,8 +45,13 @@
return seed;
}
+static void* allocate_node(SizeT szB)
+{ return malloc(szB); }
+static void free_node(void* p)
+{ return free(p); }
+
//---------------------------------------------------------------------------
// Word example
//---------------------------------------------------------------------------
@@ -78,8 +83,8 @@
// 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 @@
// 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 @@
// 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) );
|