mirror of
https://github.com/brl/mutter.git
synced 2025-06-13 16:59:30 +00:00
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:
@ -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);
|
||||
|
@ -749,7 +749,7 @@ cursor_gpu_state_free (MetaCursorNativeGpuState *cursor_gpu_state)
|
||||
int i;
|
||||
|
||||
for (i = 0; i < HW_CURSOR_BUFFER_COUNT; i++)
|
||||
g_clear_pointer (&cursor_gpu_state->bos[i], (GDestroyNotify) gbm_bo_destroy);
|
||||
g_clear_pointer (&cursor_gpu_state->bos[i], gbm_bo_destroy);
|
||||
g_free (cursor_gpu_state);
|
||||
}
|
||||
|
||||
@ -789,7 +789,7 @@ on_cursor_sprite_texture_changed (MetaCursorSprite *cursor_sprite)
|
||||
guint pending_bo;
|
||||
pending_bo = get_pending_cursor_sprite_gbm_bo_index (cursor_gpu_state);
|
||||
g_clear_pointer (&cursor_gpu_state->bos[pending_bo],
|
||||
(GDestroyNotify) gbm_bo_destroy);
|
||||
gbm_bo_destroy);
|
||||
cursor_gpu_state->pending_bo_state = META_CURSOR_GBM_BO_STATE_INVALIDATED;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user