From 997e958fb957d440afeac18c8ca9c0f3be4b598b Mon Sep 17 00:00:00 2001 From: Isaque Galdino Date: Fri, 21 Apr 2017 23:16:26 -0300 Subject: [PATCH] year-view: Uninitialised values Valgrind was reporting some "Conditional jump or move depends on uninitialised value(s)" and "Invalid read of size 4" when hovering year-view. It was found some uninitialised variables in the code and they were initialised before being used. https://bugzilla.gnome.org/show_bug.cgi?id=781430 --- src/views/gcal-year-view.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/views/gcal-year-view.c b/src/views/gcal-year-view.c index 46d17b95..72bd59a1 100644 --- a/src/views/gcal-year-view.c +++ b/src/views/gcal-year-view.c @@ -816,6 +816,7 @@ draw_month_grid (GcalYearView *year_view, shown_rows = ceil (days / 7.0); sunday_idx = year_view->k * 7 + sw * ((7 - year_view->first_weekday) % 7) + year_view->show_week_numbers * (1 - year_view->k); + today = icaltime_today (); today.year = year_view->date->year; today.month = month_nr + 1; today.day = 1; @@ -1205,7 +1206,7 @@ navigator_motion_notify_cb (GcalYearView *year_view, GdkEventMotion *event, GtkWidget *widget) { - gint day, month; + gint day = 0, month = 0; gboolean is_title = FALSE; /* Cancel the hover when selecting a date range */