summaryrefslogtreecommitdiffstats
path: root/Parser/pegen/parse.c
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2021-05-19 18:21:07 (GMT)
committerGitHub <noreply@github.com>2021-05-19 18:21:07 (GMT)
commit509e1c9d35ab3cb9814aaeb5324258298ce481e9 (patch)
tree45b13222e458a34b6237427acaeea00d7b2c214e /Parser/pegen/parse.c
parent0bcd1515aa00ae9388ed753825cc206053243189 (diff)
downloadcpython-509e1c9d35ab3cb9814aaeb5324258298ce481e9.zip
cpython-509e1c9d35ab3cb9814aaeb5324258298ce481e9.tar.gz
cpython-509e1c9d35ab3cb9814aaeb5324258298ce481e9.tar.bz2
Fix compiler warning in the xml module (GH-26245) (GH-26248)
The newest version of gcc complains about passing un-initialized arrays as constant pointers: ``` /Modules/expat/xmltok_ns.c: In function ‘findEncodingNS’: /Modules/expat/xmltok.h:272:10: warning: ‘buf’ may be used uninitialized [-Wmaybe-uninitialized] 272 | (((enc)->utf8Convert)(enc, fromP, fromLim, toP, toLim)) | ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /Modules/expat/xmltok_ns.c:95:3: note: in expansion of macro ‘XmlUtf8Convert’ 95 | XmlUtf8Convert(enc, &ptr, end, &p, p + ENCODING_MAX - 1); | ^~~~~~~~~~~~~~ /Modules/expat/xmltok.h:272:10: note: by argument 5 of type ‘const char *’ to ‘enum XML_Convert_Result(const ENCODING *, const char **, const char *, char **, const char *)’ {aka ‘enum XML_Convert_Result(const struct encoding *, const char **, const char *, char **, const char *)’} 272 | (((enc)->utf8Convert)(enc, fromP, fromLim, toP, toLim)) | ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /Modules/expat/xmltok_ns.c:95:3: note: in expansion of macro ‘XmlUtf8Convert’ 95 | XmlUtf8Convert(enc, &ptr, end, &p, p + ENCODING_MAX - 1); | ^~~~~~~~~~~~~~ In file included from /Modules/expat/xmltok.c:1657: /Modules/expat/xmltok_ns.c:92:8: note: ‘buf’ declared here 92 | char buf[ENCODING_MAX]; ``` (cherry picked from commit be93f81e58ba3742589259ef84325a95b547e424) Co-authored-by: Pablo Galindo <Pablogsal@gmail.com> Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
Diffstat (limited to 'Parser/pegen/parse.c')
0 files changed, 0 insertions, 0 deletions