mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-17 23:24:51 +00:00
shell-camera-monitor: Fix warning about strict aliasing
Changing type when casting a double pointer is not strictly allowed in
C. In order to fix compilation with `-fstrict-aliasing`, don’t use
`g_clear_pointer()` for clearing this pointer where the type expected by
the destroy notify function does not match the type stored in the
`ShellCameraMonitor` struct.
This introduces no functional changes.
Signed-off-by: Philip Withnall <pwithnall@gnome.org>
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3351>
(cherry picked from commit 37e49e8a22)
This commit is contained in:
parent
2434c03e65
commit
0af05089fa
1 changed files with 5 additions and 1 deletions
|
|
@ -298,7 +298,11 @@ shell_camera_monitor_disconnect_core (ShellCameraMonitor *monitor)
|
|||
g_clear_handle_id (&monitor->delayed_disable_id, g_source_remove);
|
||||
|
||||
spa_hook_remove (&monitor->registry_listener);
|
||||
g_clear_pointer ((struct pw_proxy**) &monitor->registry, pw_proxy_destroy);
|
||||
if (monitor->registry != NULL)
|
||||
{
|
||||
pw_proxy_destroy ((struct pw_proxy *) monitor->registry);
|
||||
monitor->registry = NULL;
|
||||
}
|
||||
spa_hook_remove (&monitor->core_listener);
|
||||
g_clear_pointer (&monitor->core, pw_core_disconnect);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue