From 98c1b8461743f263bfe8f23e3ce6e1bc4faa8901 Mon Sep 17 00:00:00 2001 From: Loic Le Page Date: Wed, 19 Jan 2022 18:49:56 +0100 Subject: [PATCH] Fix redefinition of local variable and non-initialized variable in gio/gresource.c --- gio/gresource.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gio/gresource.c b/gio/gresource.c index 53933f9d2..45ca92b1f 100644 --- a/gio/gresource.c +++ b/gio/gresource.c @@ -346,7 +346,7 @@ g_resource_find_overlay (const gchar *path, if (envvar != NULL) { gchar **parts; - gint i, j; + gint j; parts = g_strsplit (envvar, G_SEARCHPATH_SEPARATOR_S, 0); @@ -414,7 +414,7 @@ g_resource_find_overlay (const gchar *path, /* We go out of the way to avoid malloc() in the normal case * where the environment variable is not set. */ - static const gchar * const empty_strv[0 + 1]; + static const gchar *const empty_strv[0 + 1] = { 0 }; result = empty_strv; }