gsettingsschema: Fix a compiler warning

g_build_filename() returns a gchar*, but it was stored in a const gchar*
and then g_free()d, which is wrong and led to a warning about the const
qualifier being cast away.
This commit is contained in:
Daniel Boles 2017-07-12 19:23:40 +01:00
parent 7d64d109f0
commit 5eededccda

View File

@ -324,7 +324,7 @@ try_prepend_dir (const gchar *directory)
static void static void
try_prepend_data_dir (const gchar *directory) try_prepend_data_dir (const gchar *directory)
{ {
const gchar *dirname = g_build_filename (directory, "glib-2.0", "schemas", NULL); gchar *dirname = g_build_filename (directory, "glib-2.0", "schemas", NULL);
try_prepend_dir (dirname); try_prepend_dir (dirname);
g_free (dirname); g_free (dirname);
} }