[gnome-control-center] background: Fix compile warnings with g_clear_pointer



commit 2b95f9576dfa7eecd504937f6f9255c7d21e4548
Author: Robert Ancell <robert ancell canonical com>
Date:   Thu Feb 7 11:22:53 2019 +1300

    background: Fix compile warnings with g_clear_pointer

 panels/background/bg-pictures-source.c   | 4 ++--
 panels/background/bg-wallpapers-source.c | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/panels/background/bg-pictures-source.c b/panels/background/bg-pictures-source.c
index eab84ad87..714c7f744 100644
--- a/panels/background/bg-pictures-source.c
+++ b/panels/background/bg-pictures-source.c
@@ -263,7 +263,7 @@ picture_scaled (GObject *source_object,
                        bg_pictures_source_get_unique_filename (uri),
                        GINT_TO_POINTER (TRUE));
 
-  g_clear_pointer (&surface, (GDestroyNotify) cairo_surface_destroy);
+  g_clear_pointer (&surface, cairo_surface_destroy);
 }
 
 static void
@@ -576,7 +576,7 @@ add_single_file (BgPicturesSource     *bg_source,
         *ret_row_ref = NULL;
     }
   gtk_tree_path_free (path);
-  g_clear_pointer (&surface, (GDestroyNotify) cairo_surface_destroy);
+  g_clear_pointer (&surface, cairo_surface_destroy);
   return retval;
 }
 
diff --git a/panels/background/bg-wallpapers-source.c b/panels/background/bg-wallpapers-source.c
index a1fb460c2..ccb7e2f08 100644
--- a/panels/background/bg-wallpapers-source.c
+++ b/panels/background/bg-wallpapers-source.c
@@ -73,7 +73,7 @@ load_wallpapers (gchar              *key,
                       1, item,
                       2, cc_background_item_get_name (item),
                       -1);
-  g_clear_pointer (&surface, (GDestroyNotify) cairo_surface_destroy);
+  g_clear_pointer (&surface, cairo_surface_destroy);
 }
 
 static void


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]