mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-13 07:56:17 +01:00
Fix non-initialized variable in glib/gdatetime.c
This commit is contained in:
parent
7304e4de17
commit
d5580edfa7
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user