Merge branch 'compiler-warnings' into 'master'

Fix a couple of wrong compiler warnings

See merge request GNOME/glib!615
This commit is contained in:
Sebastian Dröge 2019-01-24 15:15:07 +00:00
commit f5541d8a6e
2 changed files with 9 additions and 5 deletions

View File

@ -909,7 +909,7 @@ _g_io_module_get_default (const gchar *extension_point,
const char *use_this;
GList *l;
GIOExtensionPoint *ep;
GIOExtension *extension, *preferred;
GIOExtension *extension = NULL, *preferred;
gpointer impl;
g_rec_mutex_lock (&default_modules_lock);
@ -986,9 +986,12 @@ _g_io_module_get_default (const gchar *extension_point,
g_rec_mutex_unlock (&default_modules_lock);
if (impl != NULL)
g_debug ("%s: Found default implementation %s (%s) for %s",
G_STRFUNC, g_io_extension_get_name (extension),
G_OBJECT_TYPE_NAME (impl), extension_point);
{
g_assert (extension != NULL);
g_debug ("%s: Found default implementation %s (%s) for %s",
G_STRFUNC, g_io_extension_get_name (extension),
G_OBJECT_TYPE_NAME (impl), extension_point);
}
else
g_debug ("%s: Failed to find default implementation for %s",
G_STRFUNC, extension_point);

View File

@ -155,7 +155,7 @@ test_default (void)
static void
test_fallback (void)
{
GAppInfo *info1, *info2, *app;
GAppInfo *info1, *info2, *app = NULL;
GList *apps, *recomm, *fallback, *list, *l, *m;
GError *error = NULL;
gint old_length;
@ -188,6 +188,7 @@ test_fallback (void)
if (g_app_info_equal (info1, app))
break;
}
g_assert_nonnull (app);
g_assert_true (g_app_info_equal (info1, app));
/* and that Test2 is among the fallback apps */