Fix non-initialized variable in glib/gdatetime.c

This commit is contained in:
Loic Le Page 2022-01-19 21:06:22 +01:00 committed by Loïc Le Page
parent 7304e4de17
commit d5580edfa7

View File

@ -622,7 +622,7 @@ g_date_time_get_week_number (GDateTime *datetime,
gint *day_of_week,
gint *day_of_year)
{
gint a, b, c, d, e, f, g, n, s, month, day, year;
gint a, b, c, d, e, f, g, n, s, month = -1, day = -1, year = -1;
g_date_time_get_ymd (datetime, &year, &month, &day);
@ -2342,7 +2342,7 @@ g_date_time_get_day_of_month (GDateTime *datetime)
gint
g_date_time_get_week_numbering_year (GDateTime *datetime)
{
gint year, month, day, weekday;
gint year = -1, month = -1, day = -1, weekday;
g_date_time_get_ymd (datetime, &year, &month, &day);
weekday = g_date_time_get_day_of_week (datetime);