Merge branch 'wip/pwithnall/disable-assert' into 'master'

gfileicon: Fix unused-but-set variable with G_DISABLE_ASSERT

See merge request GNOME/glib!1769
This commit is contained in:
Philip Withnall 2020-11-24 10:10:26 +00:00
commit 9aaac19173

View File

@ -114,12 +114,12 @@ g_file_icon_set_property (GObject *object,
static void
g_file_icon_constructed (GObject *object)
{
GFileIcon *icon;
#ifndef G_DISABLE_ASSERT
GFileIcon *icon = G_FILE_ICON (object);
#endif
G_OBJECT_CLASS (g_file_icon_parent_class)->constructed (object);
icon = G_FILE_ICON (object);
/* Must have be set during construction */
g_assert (icon->file != NULL);
}