aboutsummaryrefslogtreecommitdiffstats
path: root/src/tree.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-08-26 08:27:02 +0200
committerMax Kellermann <max@duempel.org>2008-08-26 08:27:02 +0200
commita383f4511734b978020b1f8b4360ef9ad438e929 (patch)
tree36eed149dc77683414b81e91b463a5a4376d000e /src/tree.c
parentd05c8fd422266f5769ba8bde1ee23a20a73578a7 (diff)
downloadmpd-a383f4511734b978020b1f8b4360ef9ad438e929.tar.gz
mpd-a383f4511734b978020b1f8b4360ef9ad438e929.tar.xz
mpd-a383f4511734b978020b1f8b4360ef9ad438e929.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..8b577c853 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);