Fix statement-before-declaration warnings for the core code.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4906 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/coregrind/m_oset.c b/coregrind/m_oset.c
index c3570ee..695d45d 100644
--- a/coregrind/m_oset.c
+++ b/coregrind/m_oset.c
@@ -433,11 +433,13 @@
// avl_insert() which doesn't return a Bool.
void VG_(OSet_Insert)(AvlTree* t, void* e)
{
+ AvlNode* n;
+
vg_assert(t);
// Initialise. Even though OSet_AllocNode zeroes these fields, we should
// do it again in case a node is removed and then re-added to the tree.
- AvlNode* n = node_of_elem(e);
+ n = node_of_elem(e);
n->left = 0;
n->right = 0;
n->balance = 0;
@@ -532,9 +534,9 @@
Int cmpres = cmp_key_root(t, n);
if (cmpres < 0) {
+ AvlTree left_subtree;
// Remove from the left subtree
vg_assert(t->root->left);
- AvlTree left_subtree;
// Only need to set the used fields in the subtree.
left_subtree.root = t->root->left;
left_subtree.cmp = t->cmp;