[gtk+] widget path: Fix compiler warnings
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] widget path: Fix compiler warnings
- Date: Tue, 2 Jun 2015 13:12:01 +0000 (UTC)
commit b9919153b2bd1602de618269e01afac1a27bfab4
Author: Matthias Clasen <mclasen redhat com>
Date: Sat May 30 21:30:26 2015 -0400
widget path: Fix compiler warnings
Fix warnings due to -Wdeclaration-after-statement and -Wshadow.
gtk/gtkwidgetpath.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/gtk/gtkwidgetpath.c b/gtk/gtkwidgetpath.c
index 8f3ae06..45cda6b 100644
--- a/gtk/gtkwidgetpath.c
+++ b/gtk/gtkwidgetpath.c
@@ -332,15 +332,14 @@ gtk_widget_path_to_string (const GtkWidgetPath *path)
if (elem->state)
{
GFlagsClass *fclass;
- gint i;
fclass = g_type_class_ref (GTK_TYPE_STATE_FLAGS);
- for (i = 0; i < fclass->n_values; i++)
+ for (j = 0; j < fclass->n_values; j++)
{
- if (elem->state & fclass->values[i].value)
+ if (elem->state & fclass->values[j].value)
{
g_string_append_c (string, ':');
- g_string_append (string, fclass->values[i].value_nick);
+ g_string_append (string, fclass->values[j].value_nick);
}
}
g_type_class_unref (fclass);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]