widget path: Fix compiler warnings

Fix warnings due to -Wdeclaration-after-statement and -Wshadow.
This commit is contained in:
Matthias Clasen
2015-05-30 21:30:26 -04:00
parent 165861323a
commit b9919153b2

View File

@ -332,15 +332,14 @@ gtk_widget_path_to_string (const GtkWidgetPath *path)
if (elem->state) if (elem->state)
{ {
GFlagsClass *fclass; GFlagsClass *fclass;
gint i;
fclass = g_type_class_ref (GTK_TYPE_STATE_FLAGS); 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_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); g_type_class_unref (fclass);