Don't cast free function passed to g_clear_pointer

The function is intentionally provided as macro to not require a
cast. Recently the macro was improved to check that the passed in
pointer matches the free function, so the cast to GDestroyNotify
is now even harmful.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/176
This commit is contained in:
Florian Müllner
2018-07-23 19:22:51 +02:00
parent c403785d36
commit 7fdaf7721c
8 changed files with 22 additions and 22 deletions

View File

@ -578,9 +578,9 @@ meta_screen_cast_stream_src_finalize (GObject *object)
if (meta_screen_cast_stream_src_is_enabled (src))
meta_screen_cast_stream_src_disable (src);
g_clear_pointer (&priv->pipewire_stream, (GDestroyNotify) pw_stream_destroy);
g_clear_pointer (&priv->pipewire_remote, (GDestroyNotify) pw_remote_destroy);
g_clear_pointer (&priv->pipewire_core, (GDestroyNotify) pw_core_destroy);
g_clear_pointer (&priv->pipewire_stream, pw_stream_destroy);
g_clear_pointer (&priv->pipewire_remote, pw_remote_destroy);
g_clear_pointer (&priv->pipewire_core, pw_core_destroy);
g_source_destroy (&priv->pipewire_source->base);
G_OBJECT_CLASS (meta_screen_cast_stream_src_parent_class)->finalize (object);