[gnome-control-center] display: Fix compile warnings using g_clear_pointer
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] display: Fix compile warnings using g_clear_pointer
- Date: Wed, 17 Oct 2018 22:07:16 +0000 (UTC)
commit 04b0b68be47dcecd65b26beffd347246f1ddbc6b
Author: Robert Ancell <robert ancell canonical com>
Date: Wed Oct 17 09:16:50 2018 +1300
display: Fix compile warnings using g_clear_pointer
panels/display/cc-display-panel.c | 2 +-
panels/display/cc-night-light-widget.c | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/panels/display/cc-display-panel.c b/panels/display/cc-display-panel.c
index 8db886931..e1d2aa73c 100644
--- a/panels/display/cc-display-panel.c
+++ b/panels/display/cc-display-panel.c
@@ -272,7 +272,7 @@ cc_display_panel_dispose (GObject *object)
g_clear_object (&self->shell_cancellable);
g_clear_object (&self->shell_proxy);
- g_clear_pointer (&self->night_light_dialog, gtk_widget_destroy);
+ g_clear_pointer ((GtkWidget **) &self->night_light_dialog, gtk_widget_destroy);
G_OBJECT_CLASS (cc_display_panel_parent_class)->dispose (object);
}
diff --git a/panels/display/cc-night-light-widget.c b/panels/display/cc-night-light-widget.c
index 8b5d60024..3c0e9d8a9 100644
--- a/panels/display/cc-night-light-widget.c
+++ b/panels/display/cc-night-light-widget.c
@@ -119,8 +119,8 @@ cc_night_light_widget_style_updated (GtkWidget *widget)
CcNightLightWidget *self = CC_NIGHT_LIGHT_WIDGET (widget);
GtkIconTheme *icon_theme = gtk_icon_theme_get_default ();
- g_clear_pointer (&self->surface_sunrise, (GDestroyNotify) cairo_surface_destroy);
- g_clear_pointer (&self->surface_sunset, (GDestroyNotify) cairo_surface_destroy);
+ g_clear_pointer (&self->surface_sunrise, cairo_surface_destroy);
+ g_clear_pointer (&self->surface_sunset, cairo_surface_destroy);
self->surface_sunrise =
gtk_icon_theme_load_surface (icon_theme, "daytime-sunrise-symbolic",
@@ -152,8 +152,8 @@ cc_night_light_widget_finalize (GObject *object)
{
CcNightLightWidget *self = CC_NIGHT_LIGHT_WIDGET (object);
- g_clear_pointer (&self->surface_sunrise, (GDestroyNotify) cairo_surface_destroy);
- g_clear_pointer (&self->surface_sunset, (GDestroyNotify) cairo_surface_destroy);
+ g_clear_pointer (&self->surface_sunrise, cairo_surface_destroy);
+ g_clear_pointer (&self->surface_sunset, cairo_surface_destroy);
G_OBJECT_CLASS (cc_night_light_widget_parent_class)->finalize (object);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]