Fix redefinition of local variable in gio/glib-compile-schemas.c

This commit is contained in:
Loic Le Page 2022-01-19 18:45:20 +01:00 committed by Loïc Le Page
parent 9380a8cdb0
commit 7a50259345

View File

@ -1038,7 +1038,7 @@ schema_state_add_override (SchemaState *state,
GError **error) GError **error)
{ {
SchemaState *parent; SchemaState *parent;
KeyState *original; KeyState *original = NULL;
if (state->extends == NULL) if (state->extends == NULL)
{ {
@ -1386,14 +1386,14 @@ start_element (GMarkupParseContext *context,
} }
else if (strcmp (element_name, "override") == 0) else if (strcmp (element_name, "override") == 0)
{ {
const gchar *name, *l10n, *context; const gchar *name, *l10n, *str_context;
if (COLLECT (STRING, "name", &name, if (COLLECT (STRING, "name", &name,
OPTIONAL | STRING, "l10n", &l10n, OPTIONAL | STRING, "l10n", &l10n,
OPTIONAL | STRING, "context", &context)) OPTIONAL | STRING, "context", &str_context))
schema_state_add_override (state->schema_state, schema_state_add_override (state->schema_state,
&state->key_state, &state->string, &state->key_state, &state->string,
name, l10n, context, error); name, l10n, str_context, error);
return; return;
} }
} }
@ -1403,11 +1403,11 @@ start_element (GMarkupParseContext *context,
{ {
if (strcmp (element_name, "default") == 0) if (strcmp (element_name, "default") == 0)
{ {
const gchar *l10n, *context; const gchar *l10n, *str_context;
if (COLLECT (STRING | OPTIONAL, "l10n", &l10n, if (COLLECT (STRING | OPTIONAL, "l10n", &l10n,
STRING | OPTIONAL, "context", &context)) STRING | OPTIONAL, "context", &str_context))
state->string = key_state_start_default (state->key_state, state->string = key_state_start_default (state->key_state,
l10n, context, error); l10n, str_context, error);
return; return;
} }