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:
committed by
Marge Bot
parent
eeb9c99172
commit
32ebd80613
@@ -130,7 +130,6 @@ update_color (GcalCalendar *self)
|
||||
static gboolean
|
||||
update_idle_cb (gpointer data)
|
||||
{
|
||||
g_autoptr (GMutexLocker) locker = NULL;
|
||||
GcalCalendarPrivate *priv;
|
||||
GcalCalendar *self;
|
||||
|
||||
@@ -141,7 +140,7 @@ update_idle_cb (gpointer data)
|
||||
self = GCAL_CALENDAR (data);
|
||||
priv = gcal_calendar_get_instance_private (self);
|
||||
|
||||
locker = g_mutex_locker_new (&priv->shared.mutex);
|
||||
G_MUTEX_AUTO_LOCK (&priv->shared.mutex, locker);
|
||||
|
||||
if (priv->shared.name_changed)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user