diff --git a/glib/goption.c b/glib/goption.c index c59f14855..f9bae854f 100644 --- a/glib/goption.c +++ b/glib/goption.c @@ -1801,7 +1801,7 @@ g_option_context_parse (GOptionContext *context, gchar ***argv, GError **error) { - gint i, j, k; + gint i, k; GList *list; g_return_val_if_fail (context != NULL, FALSE); @@ -1956,7 +1956,7 @@ g_option_context_parse (GOptionContext *context, arg = (*argv)[i] + 1; arg_length = strlen (arg); nulled_out = g_newa0 (gboolean, arg_length); - for (j = 0; j < arg_length; j++) + for (int j = 0; j < arg_length; j++) { if (context->help_enabled && (arg[j] == '?' || (arg[j] == 'h' && !has_h_entry))) @@ -1995,7 +1995,7 @@ g_option_context_parse (GOptionContext *context, { gchar *new_arg = NULL; gint arg_index = 0; - for (j = 0; j < arg_length; j++) + for (int j = 0; j < arg_length; j++) { if (!nulled_out[j]) { @@ -2084,7 +2084,7 @@ g_option_context_parse (GOptionContext *context, if (k > i) { k -= i; - for (j = i + k; j < *argc; j++) + for (int j = i + k; j < *argc; j++) { (*argv)[j-k] = (*argv)[j]; (*argv)[j] = NULL;