aboutsummaryrefslogtreecommitdiffstats
path: root/src/tree.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-08-26 08:27:02 +0200
committerEric Wong <normalperson@yhbt.net>2008-08-30 17:38:50 -0700
commitac5ec35a6e222f635912f6a7eaf3c036c71367b6 (patch)
treecb6d1ec7b4b5d165b61da5b27e717c52b1b3f5c6 /src/tree.c
parent2147b207c03891bd657043766444006dce513a93 (diff)
downloadmpd-ac5ec35a6e222f635912f6a7eaf3c036c71367b6.tar.gz
mpd-ac5ec35a6e222f635912f6a7eaf3c036c71367b6.tar.xz
mpd-ac5ec35a6e222f635912f6a7eaf3c036c71367b6.zip
enable -Wpointer-arith, -Wstrict-prototypes
Also enable -Wunused-parameter - this forces us to add the gcc "unused" attribute to a lot of parameters (mostly library callback functions), but it's worth it during code refactorizations.
Diffstat (limited to '')
-rw-r--r--src/tree.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/tree.c b/src/tree.c
index 4b212cca6..40dc4224c 100644
--- a/src/tree.c
+++ b/src/tree.c
@@ -171,8 +171,7 @@ _SplitNode(TreeNode * node)
static
void
-_InsertNodeAndData(Tree * tree,
- TreeNode * node,
+_InsertNodeAndData(TreeNode * node,
int pos,
TreeNode * newNode,
TreeKeyData keyData)
@@ -204,8 +203,7 @@ _InsertNodeAndData(Tree * tree,
static
TreeKeyData
-_AddDataToSplitNodes(Tree * tree,
- TreeNode * lessNode,
+_AddDataToSplitNodes(TreeNode * lessNode,
TreeNode * moreNode,
int pos,
TreeNode * newNode,
@@ -217,7 +215,7 @@ _AddDataToSplitNodes(Tree * tree,
if (pos <= lessNode->count)
{
- _InsertNodeAndData(tree, lessNode, pos, newNode, keyData);
+ _InsertNodeAndData(lessNode, pos, newNode, keyData);
lessNode->count--;
retKeyData = lessNode->keyData[lessNode->count];
_ClearKeyData(&(lessNode->keyData[lessNode->count]));
@@ -277,8 +275,7 @@ _InsertAt(TreeIterator * iter, TreeKeyData keyData)
TreeNode * newNode = _SplitNode(node);
/* insert data in split nodes */
- keyData = _AddDataToSplitNodes(iter->tree,
- node,
+ keyData = _AddDataToSplitNodes(node,
newNode,
pos,
insertNode,
@@ -306,8 +303,7 @@ _InsertAt(TreeIterator * iter, TreeKeyData keyData)
else
{
/* insert the data and newNode */
- _InsertNodeAndData(iter->tree,
- node,
+ _InsertNodeAndData(node,
pos,
insertNode,
keyData);