|
From: <sv...@va...> - 2008-02-20 15:20:34
|
Author: sewardj
Date: 2008-02-20 15:20:33 +0000 (Wed, 20 Feb 2008)
New Revision: 7429
Log:
Minimal changes needed to make the regression tests build and run
again.
Modified:
branches/DATASYMS/coregrind/m_debuginfo/readdwarf3.c
branches/DATASYMS/coregrind/m_oset.c
branches/DATASYMS/memcheck/mc_malloc_wrappers.c
branches/DATASYMS/memcheck/tests/oset_test.c
Modified: branches/DATASYMS/coregrind/m_debuginfo/readdwarf3.c
===================================================================
--- branches/DATASYMS/coregrind/m_debuginfo/readdwarf3.c 2008-02-20 01:12:54 UTC (rev 7428)
+++ branches/DATASYMS/coregrind/m_debuginfo/readdwarf3.c 2008-02-20 15:20:33 UTC (rev 7429)
@@ -1490,7 +1490,7 @@
}
}
if (!found) {
- if (VG_(clo_verbosity) >= 0) {
+ if (0 && VG_(clo_verbosity) >= 0) {
VG_(message)(Vg_DebugMsg,
"warning: parse_var_DIE: non-external variable "
"outside DW_TAG_subprogram");
Modified: branches/DATASYMS/coregrind/m_oset.c
===================================================================
--- branches/DATASYMS/coregrind/m_oset.c 2008-02-20 01:12:54 UTC (rev 7428)
+++ branches/DATASYMS/coregrind/m_oset.c 2008-02-20 15:20:33 UTC (rev 7429)
@@ -786,7 +786,7 @@
Word cmpresS; /* signed */
UWord cmpresU; /* unsigned */
- tl_assert(oset);
+ vg_assert(oset);
stackClear(oset);
if (!oset->root)
@@ -833,7 +833,7 @@
if (stackPop(oset, &n, &i)) {
// If we've pushed something to stack and did not find the exact key,
// we must fix the top element of stack.
- tl_assert(i == 2);
+ vg_assert(i == 2);
stackPush(oset, n, 3);
// the stack looks like {2, 2, ..., 2, 3}
}
Modified: branches/DATASYMS/memcheck/mc_malloc_wrappers.c
===================================================================
--- branches/DATASYMS/memcheck/mc_malloc_wrappers.c 2008-02-20 01:12:54 UTC (rev 7428)
+++ branches/DATASYMS/memcheck/mc_malloc_wrappers.c 2008-02-20 15:20:33 UTC (rev 7429)
@@ -508,7 +508,9 @@
{
MC_Chunk* mc1 = *(MC_Chunk**)n1;
MC_Chunk* mc2 = *(MC_Chunk**)n2;
- return (mc1->data < mc2->data ? -1 : 1);
+ if (mc1->data < mc2->data) return -1;
+ if (mc1->data > mc2->data) return 1;
+ return 0;
}
static void
Modified: branches/DATASYMS/memcheck/tests/oset_test.c
===================================================================
--- branches/DATASYMS/memcheck/tests/oset_test.c 2008-02-20 01:12:54 UTC (rev 7428)
+++ branches/DATASYMS/memcheck/tests/oset_test.c 2008-02-20 15:20:33 UTC (rev 7429)
@@ -347,7 +347,7 @@
return buf;
}
-static Word blockCmp(void* vkey, void* velem)
+static Word blockCmp(const void* vkey, const void* velem)
{
Addr key = *(Addr*)vkey;
Block* elem = (Block*)velem;
@@ -369,8 +369,8 @@
// Create a dynamic OSet of Blocks. This one uses slow (custom)
// comparisons.
OSet* oset = VG_(OSetGen_Create)(offsetof(Block, first),
- blockCmp,
- (void*)malloc, free);
+ blockCmp,
+ malloc, free);
// Try some operations on an empty OSet to ensure they don't screw up.
vg_assert( ! VG_(OSetGen_Contains)(oset, &v) );
|