|
From: <sv...@va...> - 2006-10-17 01:40:35
|
Author: sewardj
Date: 2006-10-17 02:40:33 +0100 (Tue, 17 Oct 2006)
New Revision: 6270
Log:
Merge r6133:
Inline stackPush and stackPop and placate gcc's resulting concerns
about uninitialised variables.
and also change ownership.
Modified:
trunk/coregrind/m_oset.c
trunk/coregrind/pub_core_oset.h
trunk/include/pub_tool_oset.h
Modified: trunk/coregrind/m_oset.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_oset.c 2006-10-17 01:39:30 UTC (rev 6269)
+++ trunk/coregrind/m_oset.c 2006-10-17 01:40:33 UTC (rev 6270)
@@ -7,7 +7,7 @@
This file is part of Valgrind, a dynamic binary instrumentation
framework.
=20
- Copyright (C) 2005 Nicholas Nethercote
+ Copyright (C) 2005-2006 Nicholas Nethercote
nj...@va...
=20
This program is free software; you can redistribute it and/or
@@ -236,7 +236,7 @@
}
=20
// Push onto the iterator stack.
-static void stackPush(AvlTree* t, AvlNode* n, Int i)
+static inline void stackPush(AvlTree* t, AvlNode* n, Int i)
{
vg_assert(t->stackTop < STACK_MAX);
vg_assert(1 <=3D i && i <=3D 3);
@@ -246,7 +246,7 @@
}
=20
// Pop from the iterator stack.
-static Bool stackPop(AvlTree* t, AvlNode** n, Int* i)
+static inline Bool stackPop(AvlTree* t, AvlNode** n, Int* i)
{
vg_assert(t->stackTop <=3D STACK_MAX);
=20
@@ -296,8 +296,8 @@
// Destructor, frees up all memory held by remaining nodes.
void VG_(OSet_Destroy)(AvlTree* t, OSetNodeDestroy_t destroyNode)
{
- AvlNode* n;
- Int i, sz =3D 0;
+ AvlNode* n =3D NULL;
+ Int i =3D 0, sz =3D 0;
=20
vg_assert(t);
stackClear(t);
@@ -682,8 +682,8 @@
=20
void* VG_(OSet_Next)(AvlTree* t)
{
- Int i;
- OSetNode* n;
+ Int i =3D 0;
+ OSetNode* n =3D NULL;
=20
vg_assert(t);
=20
Modified: trunk/coregrind/pub_core_oset.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/pub_core_oset.h 2006-10-17 01:39:30 UTC (rev 6269)
+++ trunk/coregrind/pub_core_oset.h 2006-10-17 01:40:33 UTC (rev 6270)
@@ -1,14 +1,14 @@
=20
/*--------------------------------------------------------------------*/
-/*--- An ordered set implemenation. pub_core_oset.h ---*/
+/*--- An ordered set implementation. pub_core_oset.h ---*/
/*--------------------------------------------------------------------*/
=20
/*
This file is part of Valgrind, a dynamic binary instrumentation
framework.
=20
- Copyright (C) 2000-2006 Julian Seward
- js...@ac...
+ Copyright (C) 2005-2006 Nicholas Nethercote
+ nj...@va...
=20
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
Modified: trunk/include/pub_tool_oset.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/include/pub_tool_oset.h 2006-10-17 01:39:30 UTC (rev 6269)
+++ trunk/include/pub_tool_oset.h 2006-10-17 01:40:33 UTC (rev 6270)
@@ -7,8 +7,8 @@
This file is part of Valgrind, a dynamic binary instrumentation
framework.
=20
- Copyright (C) 2000-2006 Julian Seward
- js...@ac...
+ Copyright (C) 2005-2006 Nicholas Nethercote
+ nj...@va...
=20
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
|