summaryrefslogtreecommitdiff
path: root/gdk
diff options
context:
space:
mode:
authorErnestas Kulik <ernestask@gnome.org>2018-07-25 10:00:09 +0300
committerErnestas Kulik <ernestask@gnome.org>2018-07-25 10:05:39 +0300
commit6adaf7c33d9a0d59b8b17bcd860957ef94a5c134 (patch)
tree0398d18e3c329f76f1a6d14ee3e688939d414b6d /gdk
parent95a4eff6baddb174ef5ff8384250bd8c1e6e1f32 (diff)
downloadgtk+-6adaf7c33d9a0d59b8b17bcd860957ef94a5c134.tar.gz
Remove GDestroyNotify casts in g_clear_pointer() usesg-clear-pointer-propagate
GLib master propagates argument types in g_clear_pointer(), which causes the usual function pointer casts to GDestroyNotify to trip compiler warnings. Additionally, this commit changes some cleanup functions where appropriate (wl_data_source_destroy -> gtk_primary_selection_source_destroy for struct gtk_primary_selection_source).
Diffstat (limited to 'gdk')
-rw-r--r--gdk/wayland/gdkclipboard-wayland.c4
-rw-r--r--gdk/wayland/gdkdevice-wayland.c2
-rw-r--r--gdk/wayland/gdkdrag-wayland.c4
-rw-r--r--gdk/wayland/gdkdrop-wayland.c2
-rw-r--r--gdk/wayland/gdkprimary-wayland.c6
5 files changed, 9 insertions, 9 deletions
diff --git a/gdk/wayland/gdkclipboard-wayland.c b/gdk/wayland/gdkclipboard-wayland.c
index 25671ff670..bed53a71aa 100644
--- a/gdk/wayland/gdkclipboard-wayland.c
+++ b/gdk/wayland/gdkclipboard-wayland.c
@@ -52,13 +52,13 @@ static void
gdk_wayland_clipboard_discard_offer (GdkWaylandClipboard *cb)
{
g_clear_pointer (&cb->offer_formats, gdk_content_formats_unref);
- g_clear_pointer (&cb->offer, (GDestroyNotify) wl_data_offer_destroy);
+ g_clear_pointer (&cb->offer, wl_data_offer_destroy);
}
static void
gdk_wayland_clipboard_discard_source (GdkWaylandClipboard *cb)
{
- g_clear_pointer (&cb->source, (GDestroyNotify) wl_data_source_destroy);
+ g_clear_pointer (&cb->source, wl_data_source_destroy);
}
static void
diff --git a/gdk/wayland/gdkdevice-wayland.c b/gdk/wayland/gdkdevice-wayland.c
index 546d600ff8..2b7557a63f 100644
--- a/gdk/wayland/gdkdevice-wayland.c
+++ b/gdk/wayland/gdkdevice-wayland.c
@@ -1087,7 +1087,7 @@ gdk_wayland_seat_discard_pending_offer (GdkWaylandSeat *seat)
gdk_content_formats_unref (ignore);
seat->pending_builder = NULL;
}
- g_clear_pointer (&seat->pending_offer, (GDestroyNotify) wl_data_offer_destroy);
+ g_clear_pointer (&seat->pending_offer, wl_data_offer_destroy);
seat->pending_source_actions = 0;
seat->pending_action = 0;
}
diff --git a/gdk/wayland/gdkdrag-wayland.c b/gdk/wayland/gdkdrag-wayland.c
index 6876bd1e95..b163a17139 100644
--- a/gdk/wayland/gdkdrag-wayland.c
+++ b/gdk/wayland/gdkdrag-wayland.c
@@ -78,8 +78,8 @@ gdk_wayland_drag_finalize (GObject *object)
gdk_drag_set_cursor (drag, NULL);
- g_clear_pointer (&wayland_drag->data_source, (GDestroyNotify) wl_data_source_destroy);
- g_clear_pointer (&wayland_drag->offer, (GDestroyNotify) wl_data_offer_destroy);
+ g_clear_pointer (&wayland_drag->data_source, wl_data_source_destroy);
+ g_clear_pointer (&wayland_drag->offer, wl_data_offer_destroy);
dnd_surface = wayland_drag->dnd_surface;
diff --git a/gdk/wayland/gdkdrop-wayland.c b/gdk/wayland/gdkdrop-wayland.c
index 1c21dafdfa..a0a02a33b4 100644
--- a/gdk/wayland/gdkdrop-wayland.c
+++ b/gdk/wayland/gdkdrop-wayland.c
@@ -69,7 +69,7 @@ gdk_wayland_drop_finalize (GObject *object)
{
GdkWaylandDrop *wayland_drop = GDK_WAYLAND_DROP (object);
- g_clear_pointer (&wayland_drop->offer, (GDestroyNotify) wl_data_offer_destroy);
+ g_clear_pointer (&wayland_drop->offer, wl_data_offer_destroy);
G_OBJECT_CLASS (gdk_wayland_drop_parent_class)->finalize (object);
}
diff --git a/gdk/wayland/gdkprimary-wayland.c b/gdk/wayland/gdkprimary-wayland.c
index 62a6941db2..98f75edc1f 100644
--- a/gdk/wayland/gdkprimary-wayland.c
+++ b/gdk/wayland/gdkprimary-wayland.c
@@ -62,20 +62,20 @@ gdk_wayland_primary_discard_pending (GdkWaylandPrimary *cb)
gdk_content_formats_unref (ignore);
cb->pending_builder = NULL;
}
- g_clear_pointer (&cb->pending, (GDestroyNotify) gtk_primary_selection_offer_destroy);
+ g_clear_pointer (&cb->pending, gtk_primary_selection_offer_destroy);
}
static void
gdk_wayland_primary_discard_offer (GdkWaylandPrimary *cb)
{
g_clear_pointer (&cb->offer_formats, gdk_content_formats_unref);
- g_clear_pointer (&cb->offer, (GDestroyNotify) gtk_primary_selection_offer_destroy);
+ g_clear_pointer (&cb->offer, gtk_primary_selection_offer_destroy);
}
static void
gdk_wayland_primary_discard_source (GdkWaylandPrimary *cb)
{
- g_clear_pointer (&cb->source, (GDestroyNotify) wl_data_source_destroy);
+ g_clear_pointer (&cb->source, gtk_primary_selection_source_destroy);
}
static void