[New-bugs-announce] [issue40714] Remove compile warning from _zoneinfo.c
Dong-hee Na
report at bugs.python.org
Thu May 21 11:54:27 EDT 2020
New submission from Dong-hee Na <donghee.na92 at gmail.com>:
/Users/corona10/oss/cpython/Modules/_zoneinfo.c:1487:9: warning: variable
'dst_offset' is used uninitialized whenever 'if' condition is true
[-Wsometimes-uninitialized]
if (*p == '\0') {
^~~~~~~~~~
/Users/corona10/oss/cpython/Modules/_zoneinfo.c:1544:50: note: uninitialized use
occurs here
build_tzrule(std_abbr, dst_abbr, std_offset, dst_offset, start, end, out);
^~~~~~~~~~
/Users/corona10/oss/cpython/Modules/_zoneinfo.c:1487:5: note: remove the 'if' if
its condition is always false
if (*p == '\0') {
^~~~~~~~~~~~~~~~~
/Users/corona10/oss/cpython/Modules/_zoneinfo.c:1460:32: note: initialize the
variable 'dst_offset' to silence this warning
long std_offset, dst_offset;
^
= 0
/Users/corona10/oss/cpython/Modules/_zoneinfo.c:1910:19: warning: suggest braces
around initialization of subobject [-Wmissing-braces]
_tzrule rv = {0};
^
{}
----------
messages: 369525
nosy: corona10
priority: normal
severity: normal
status: open
title: Remove compile warning from _zoneinfo.c
type: enhancement
versions: Python 3.10
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40714>
_______________________________________
More information about the New-bugs-announce
mailing list