Skip to content

Commit

Permalink
bpo-40714: Remove compile warning from _zoneinfo.c (pythonGH-20291)
Browse files Browse the repository at this point in the history
  • Loading branch information
corona10 authored May 21, 2020
1 parent e16d2f7 commit a487a39
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Modules/_zoneinfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -1457,7 +1457,9 @@ parse_tz_str(PyObject *tz_str_obj, _tzrule *out)
PyObject *dst_abbr = NULL;
TransitionRuleType *start = NULL;
TransitionRuleType *end = NULL;
long std_offset, dst_offset;
// Initialize offsets to invalid value (> 24 hours)
long std_offset = 1 << 20;
long dst_offset = 1 << 20;

char *tz_str = PyBytes_AsString(tz_str_obj);
if (tz_str == NULL) {
Expand Down Expand Up @@ -1907,7 +1909,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;
Expand Down

0 comments on commit a487a39

Please sign in to comment.