summaryrefslogtreecommitdiff
path: root/gtk/gtktextbtree.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2015-05-30 21:28:30 -0400
committerMatthias Clasen <mclasen@redhat.com>2015-06-02 09:08:15 -0400
commit5dc440295e63cc43d46b6a3cf4edac2b0d21e12b (patch)
tree389f8356b3055e3dde42e72ffdaa7535524eff53 /gtk/gtktextbtree.c
parenta111f6ee23046ac2d0d3319dae53dc8862152876 (diff)
downloadgtk+-5dc440295e63cc43d46b6a3cf4edac2b0d21e12b.tar.gz
text buffer: Fix compiler warnings
Fix warnings due to -Wdeclaration-after-statement and -Wshadow.
Diffstat (limited to 'gtk/gtktextbtree.c')
-rw-r--r--gtk/gtktextbtree.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/gtk/gtktextbtree.c b/gtk/gtktextbtree.c
index 106191e088..b53e5f0df0 100644
--- a/gtk/gtktextbtree.c
+++ b/gtk/gtktextbtree.c
@@ -5792,7 +5792,7 @@ gtk_text_btree_rebalance (GtkTextBTree *tree,
GtkTextBTreeNode *other;
GtkTextBTreeNode *halfwaynode = NULL; /* Initialization needed only */
GtkTextLine *halfwayline = NULL; /* to prevent cc warnings. */
- int total_children, first_children, i;
+ int total_children, first_children;
/*
* Too few children for this GtkTextBTreeNode. If this is the root then,
@@ -5861,46 +5861,46 @@ gtk_text_btree_rebalance (GtkTextBTree *tree,
}
if (node->level == 0)
{
- GtkTextLine *line;
+ GtkTextLine *line2;
- for (line = node->children.line, i = 1;
- line->next != NULL;
- line = line->next, i++)
+ for (line2 = node->children.line, i = 1;
+ line2->next != NULL;
+ line2 = line2->next, i++)
{
if (i == first_children)
{
- halfwayline = line;
+ halfwayline = line2;
}
}
- line->next = other->children.line;
+ line2->next = other->children.line;
while (i <= first_children)
{
- halfwayline = line;
- line = line->next;
+ halfwayline = line2;
+ line2 = line2->next;
i++;
}
}
else
{
- GtkTextBTreeNode *child;
+ GtkTextBTreeNode *child2;
- for (child = node->children.node, i = 1;
- child->next != NULL;
- child = child->next, i++)
+ for (child2 = node->children.node, i = 1;
+ child2->next != NULL;
+ child2 = child2->next, i++)
{
if (i <= first_children)
{
if (i == first_children)
{
- halfwaynode = child;
+ halfwaynode = child2;
}
}
}
- child->next = other->children.node;
+ child2->next = other->children.node;
while (i <= first_children)
{
- halfwaynode = child;
- child = child->next;
+ halfwaynode = child2;
+ child2 = child2->next;
i++;
}
}