From 8b313fb323169a90583777da762e3a2b5acaee99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Lapeyre?= Date: Thu, 21 May 2020 15:48:14 +0200 Subject: [PATCH] Fix warnings in zoneinfo --- Modules/_zoneinfo.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Modules/_zoneinfo.c b/Modules/_zoneinfo.c index 9f5e64d8486ccc0..e40fe4f7066bd5c 100644 --- a/Modules/_zoneinfo.c +++ b/Modules/_zoneinfo.c @@ -1457,7 +1457,8 @@ parse_tz_str(PyObject *tz_str_obj, _tzrule *out) PyObject *dst_abbr = NULL; TransitionRuleType *start = NULL; TransitionRuleType *end = NULL; - long std_offset, dst_offset; + long std_offset = 0; + long dst_offset = 0; char *tz_str = PyBytes_AsString(tz_str_obj); if (tz_str == NULL) { @@ -1907,7 +1908,7 @@ build_tzrule(PyObject *std_abbr, PyObject *dst_abbr, long std_offset, long dst_offset, TransitionRuleType *start, TransitionRuleType *end, _tzrule *out) { - _tzrule rv = {0}; + _tzrule rv = {{0}}; rv.start = start; rv.end = end;