From 62fabfc793b545250dafaf37f75650cbfdce095f Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Wed, 15 Nov 2023 15:10:11 +0100 Subject: Reduce scope of variables Mostly found by cppcheck. origin commit was: https://github.com/mate-desktop/mate-panel/commit/96c7ebc --- applets/clock/calendar-window.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'applets/clock/calendar-window.c') diff --git a/applets/clock/calendar-window.c b/applets/clock/calendar-window.c index cf6ef670..b4157344 100644 --- a/applets/clock/calendar-window.c +++ b/applets/clock/calendar-window.c @@ -543,8 +543,6 @@ void calendar_window_set_show_weeks (CalendarWindow *calwin, gboolean show_weeks) { - GtkCalendarDisplayOptions options; - g_return_if_fail (CALENDAR_IS_WINDOW (calwin)); if (show_weeks == calwin->priv->show_weeks) @@ -553,6 +551,8 @@ calendar_window_set_show_weeks (CalendarWindow *calwin, calwin->priv->show_weeks = show_weeks; if (calwin->priv->calendar) { + GtkCalendarDisplayOptions options; + options = gtk_calendar_get_display_options (GTK_CALENDAR (calwin->priv->calendar)); if (show_weeks) -- cgit v1.2.1