[glib: 2/10] Fix non-initialized variable and signed/unsigned mismatch in glib/gtimezone.c
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib: 2/10] Fix non-initialized variable and signed/unsigned mismatch in glib/gtimezone.c
- Date: Fri, 18 Feb 2022 13:45:44 +0000 (UTC)
commit 499cb2cd1a1288fc96adda6ab031e78c6a194a12
Author: Loic Le Page <llepage fluendo com>
Date: Wed Jan 19 19:00:52 2022 +0100
Fix non-initialized variable and signed/unsigned mismatch in glib/gtimezone.c
glib/gtimezone.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/glib/gtimezone.c b/glib/gtimezone.c
index 6ae1a00dc..a22f70eff 100644
--- a/glib/gtimezone.c
+++ b/glib/gtimezone.c
@@ -931,7 +931,7 @@ rules_from_windows_time_zone (const gchar *identifier,
TIME_ZONE_INFORMATION tzi;
DWORD size;
guint rules_num = 0;
- RegTZI regtzi, regtzi_prev;
+ RegTZI regtzi = { 0 }, regtzi_prev;
WCHAR winsyspath[MAX_PATH];
gunichar2 *subkey_w, *subkey_dynamic_w;
@@ -1127,7 +1127,7 @@ find_relative_date (TimeZoneDate *buffer)
g_date_set_dmy (&date, 1, buffer->mon, buffer->year);
first_wday = g_date_get_weekday (&date);
- if (first_wday > wday)
+ if ((guint) first_wday > wday)
++(buffer->week);
/* week is 1 <= w <= 5, we need 0-based */
days = 7 * (buffer->week - 1) + wday - first_wday;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]