[gnome-builder] tmpl: fix -Wsign-compare warnings
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] tmpl: fix -Wsign-compare warnings
- Date: Tue, 28 Feb 2017 20:37:00 +0000 (UTC)
commit f17d54a88be3280c8a5ca63183087980656e8514
Author: Christian Hergert <chergert redhat com>
Date: Tue Feb 28 12:36:44 2017 -0800
tmpl: fix -Wsign-compare warnings
Except in generated scanner, which we'd have to fix upstream.
contrib/tmpl/tmpl-branch-node.c | 8 ++------
contrib/tmpl/tmpl-condition-node.c | 4 +---
contrib/tmpl/tmpl-iter-node.c | 3 +--
contrib/tmpl/tmpl-node.c | 3 +--
4 files changed, 5 insertions(+), 13 deletions(-)
---
diff --git a/contrib/tmpl/tmpl-branch-node.c b/contrib/tmpl/tmpl-branch-node.c
index 10994ad..70815a0 100644
--- a/contrib/tmpl/tmpl-branch-node.c
+++ b/contrib/tmpl/tmpl-branch-node.c
@@ -141,9 +141,7 @@ tmpl_branch_node_visit_children (TmplNode *node,
if (self->children != NULL)
{
- gint i;
-
- for (i = 0; i < self->children->len; i++)
+ for (guint i = 0; i < self->children->len; i++)
{
TmplNode *child = g_ptr_array_index (self->children, i);
@@ -245,9 +243,7 @@ tmpl_branch_node_branch (TmplBranchNode *self,
if (self->children != NULL)
{
- gint i;
-
- for (i = 0; i < self->children->len; i++)
+ for (guint i = 0; i < self->children->len; i++)
{
TmplNode *child = g_ptr_array_index (self->children, i);
diff --git a/contrib/tmpl/tmpl-condition-node.c b/contrib/tmpl/tmpl-condition-node.c
index 9f7ef21..96ecac4 100644
--- a/contrib/tmpl/tmpl-condition-node.c
+++ b/contrib/tmpl/tmpl-condition-node.c
@@ -120,9 +120,7 @@ tmpl_condition_node_visit_children (TmplNode *node,
if (self->children != NULL)
{
- gint i;
-
- for (i = 0; i < self->children->len; i++)
+ for (guint i = 0; i < self->children->len; i++)
{
TmplNode *child = g_ptr_array_index (self->children, i);
visitor (child, user_data);
diff --git a/contrib/tmpl/tmpl-iter-node.c b/contrib/tmpl/tmpl-iter-node.c
index e302f9e..a98eadb 100644
--- a/contrib/tmpl/tmpl-iter-node.c
+++ b/contrib/tmpl/tmpl-iter-node.c
@@ -102,12 +102,11 @@ tmpl_iter_node_visit_children (TmplNode *node,
gpointer user_data)
{
TmplIterNode *self = (TmplIterNode *)node;
- gint i;
g_assert (TMPL_IS_ITER_NODE (self));
g_assert (visitor != NULL);
- for (i = 0; i < self->children->len; i++)
+ for (guint i = 0; i < self->children->len; i++)
{
TmplNode *child = g_ptr_array_index (self->children, i);
diff --git a/contrib/tmpl/tmpl-node.c b/contrib/tmpl/tmpl-node.c
index b6a490a..ae46881 100644
--- a/contrib/tmpl/tmpl-node.c
+++ b/contrib/tmpl/tmpl-node.c
@@ -121,7 +121,6 @@ tmpl_node_real_visit_children (TmplNode *self,
gpointer user_data)
{
TmplNodePrivate *priv = tmpl_node_get_instance_private (self);
- gint i;
TMPL_ENTRY;
@@ -130,7 +129,7 @@ tmpl_node_real_visit_children (TmplNode *self,
if (priv->children != NULL)
{
- for (i = 0; i < priv->children->len; i++)
+ for (guint i = 0; i < priv->children->len; i++)
{
TmplNode *child = g_ptr_array_index (priv->children, i);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]