[gnome-control-center/wip/oholy/warnings-fixes: 2/2] user-accounts: Add casts to suppress gcc warnings
- From: Robert Ancell <rancell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center/wip/oholy/warnings-fixes: 2/2] user-accounts: Add casts to suppress gcc warnings
- Date: Wed, 15 Aug 2018 22:13:39 +0000 (UTC)
commit 70d8427b04448aee087020f2adcad6f49e443d77
Author: Ondrej Holy <oholy redhat com>
Date: Wed Aug 15 15:11:09 2018 +0200
user-accounts: Add casts to suppress gcc warnings
"warning: passing argument 1 of ‘gtk_widget_destroy’ from incompatible
pointer type" is printed from g_clear_pointer, because it is more
type-safe now. See https://gitlab.gnome.org/GNOME/glib/issues/1425 for
more info. Add the necessary casts to suppress the warnings.
panels/user-accounts/um-account-dialog.c | 2 +-
panels/user-accounts/um-user-panel.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/panels/user-accounts/um-account-dialog.c b/panels/user-accounts/um-account-dialog.c
index 12a14da6d..2b68d74f9 100644
--- a/panels/user-accounts/um-account-dialog.c
+++ b/panels/user-accounts/um-account-dialog.c
@@ -1549,7 +1549,7 @@ um_account_dialog_dispose (GObject *obj)
self->enterprise_domain_timeout_id = 0;
}
- g_clear_pointer (&self->join_dialog, gtk_widget_destroy);
+ g_clear_pointer ((GtkWidget **)&self->join_dialog, gtk_widget_destroy);
G_OBJECT_CLASS (um_account_dialog_parent_class)->dispose (obj);
}
diff --git a/panels/user-accounts/um-user-panel.c b/panels/user-accounts/um-user-panel.c
index 6ccc9e199..eaa77bdb6 100644
--- a/panels/user-accounts/um-user-panel.c
+++ b/panels/user-accounts/um-user-panel.c
@@ -1485,7 +1485,7 @@ cc_user_panel_dispose (GObject *object)
gtk_dialog_response (GTK_DIALOG (self->account_dialog), GTK_RESPONSE_DELETE_EVENT);
self->account_dialog = NULL;
}
- g_clear_pointer (&self->language_chooser, gtk_widget_destroy);
+ g_clear_pointer ((GtkWidget **)&self->language_chooser, gtk_widget_destroy);
g_clear_object (&self->permission);
G_OBJECT_CLASS (cc_user_panel_parent_class)->dispose (object);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]