core/calendar: Replace a manual GMutexLocker with G_MUTEX_AUTO_LOCK()

This takes care of static-scan's warning about a variable being set
but never read.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/581>
This commit is contained in:
Federico Mena Quintero
2025-05-28 18:08:54 +00:00
committed by Marge Bot
parent 0d3975b556
commit eeb9c99172
+1 -2
View File
@@ -217,11 +217,10 @@ on_client_readonly_changed_cb (EClient *client,
GParamSpec *pspec,
GcalCalendar *self)
{
g_autoptr (GMutexLocker) locker = NULL;
GcalCalendarPrivate *priv;
priv = gcal_calendar_get_instance_private (self);
locker = g_mutex_locker_new (&priv->shared.mutex);
G_MUTEX_AUTO_LOCK (&priv->shared.mutex, locker);
priv->shared.readonly_changed = TRUE;
schedule_idle_update_unlocked (self);