]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Merge r6133:
authorJulian Seward <jseward@acm.org>
Tue, 17 Oct 2006 01:40:33 +0000 (01:40 +0000)
committerJulian Seward <jseward@acm.org>
Tue, 17 Oct 2006 01:40:33 +0000 (01:40 +0000)
Inline stackPush and stackPop and placate gcc's resulting concerns
about uninitialised variables.

and also change ownership.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6270

coregrind/m_oset.c
coregrind/pub_core_oset.h
include/pub_tool_oset.h

index 212576b8b7844f5b08a5ff745d0f7e8b93925c42..8a8d3ae94015a69384201c70d62cd0781f2a4d47 100644 (file)
@@ -7,7 +7,7 @@
    This file is part of Valgrind, a dynamic binary instrumentation
    framework.
 
-   Copyright (C) 2005 Nicholas Nethercote
+   Copyright (C) 2005-2006 Nicholas Nethercote
       njn@valgrind.org
 
    This program is free software; you can redistribute it and/or
@@ -236,7 +236,7 @@ static void stackClear(AvlTree* t)
 }
 
 // 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 <= i && i <= 3);
@@ -246,7 +246,7 @@ static void stackPush(AvlTree* t, AvlNode* n, Int i)
 }
 
 // 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 <= STACK_MAX);
 
@@ -296,8 +296,8 @@ AvlTree* VG_(OSet_Create)(OffT _keyOff, OSetCmp_t _cmp,
 // Destructor, frees up all memory held by remaining nodes.
 void VG_(OSet_Destroy)(AvlTree* t, OSetNodeDestroy_t destroyNode)
 {
-   AvlNode* n;
-   Int i, sz = 0;
+   AvlNode* n = NULL;
+   Int i = 0, sz = 0;
    
    vg_assert(t);
    stackClear(t);
@@ -682,8 +682,8 @@ void VG_(OSet_ResetIter)(AvlTree* t)
 
 void* VG_(OSet_Next)(AvlTree* t)
 {
-   Int i;
-   OSetNode* n;
+   Int i = 0;
+   OSetNode* n = NULL;
    
    vg_assert(t);
 
index 37ebd48a77ce466219d0fab34029ec7a4891fb11..0a8fd0863b7be10c0629def398c52cd15532f4b2 100644 (file)
@@ -1,14 +1,14 @@
 
 /*--------------------------------------------------------------------*/
-/*--- An ordered set implemenation.                pub_core_oset.h ---*/
+/*--- An ordered set implementation.               pub_core_oset.h ---*/
 /*--------------------------------------------------------------------*/
 
 /*
    This file is part of Valgrind, a dynamic binary instrumentation
    framework.
 
-   Copyright (C) 2000-2006 Julian Seward
-      jseward@acm.org
+   Copyright (C) 2005-2006 Nicholas Nethercote
+      njn@valgrind.org
 
    This program is free software; you can redistribute it and/or
    modify it under the terms of the GNU General Public License as
index 2c0f697d7ba89797759ea5d2ff37eba6b13ec749..30367a6a51cfb0aa0cb33966f191fc24f9a0fde7 100644 (file)
@@ -7,8 +7,8 @@
    This file is part of Valgrind, a dynamic binary instrumentation
    framework.
 
-   Copyright (C) 2000-2006 Julian Seward
-      jseward@acm.org
+   Copyright (C) 2005-2006 Nicholas Nethercote
+      njn@valgrind.org
 
    This program is free software; you can redistribute it and/or
    modify it under the terms of the GNU General Public License as