summaryrefslogtreecommitdiffstats
path: root/Modules/cjkcodecs
diff options
context:
space:
mode:
authorBrett Cannon <bcannon@gmail.com>2011-02-22 20:15:44 (GMT)
committerBrett Cannon <bcannon@gmail.com>2011-02-22 20:15:44 (GMT)
commitb94767ff44edf5d461d7cb1c8eb5160f83886358 (patch)
treeb43b482e765b0383b3326779f6815e72b2bacccb /Modules/cjkcodecs
parent79da6b7075a3d51ae042e77a2afca827e7bce435 (diff)
downloadcpython-b94767ff44edf5d461d7cb1c8eb5160f83886358.zip
cpython-b94767ff44edf5d461d7cb1c8eb5160f83886358.tar.gz
cpython-b94767ff44edf5d461d7cb1c8eb5160f83886358.tar.bz2
Issue #8914: fix various warnings from the Clang static analyzer v254.
Diffstat (limited to 'Modules/cjkcodecs')
-rw-r--r--Modules/cjkcodecs/_codecs_iso2022.c2
-rw-r--r--Modules/cjkcodecs/multibytecodec.c1
2 files changed, 2 insertions, 1 deletions
diff --git a/Modules/cjkcodecs/_codecs_iso2022.c b/Modules/cjkcodecs/_codecs_iso2022.c
index 25c1a36..cbc1542 100644
--- a/Modules/cjkcodecs/_codecs_iso2022.c
+++ b/Modules/cjkcodecs/_codecs_iso2022.c
@@ -123,7 +123,7 @@ struct iso2022_config {
CODEC_INIT(iso2022)
{
- const struct iso2022_designation *desig = CONFIG_DESIGNATIONS;
+ const struct iso2022_designation *desig;
for (desig = CONFIG_DESIGNATIONS; desig->mark; desig++)
if (desig->initializer != NULL && desig->initializer() != 0)
return -1;
diff --git a/Modules/cjkcodecs/multibytecodec.c b/Modules/cjkcodecs/multibytecodec.c
index af7ea5b..e137ff6 100644
--- a/Modules/cjkcodecs/multibytecodec.c
+++ b/Modules/cjkcodecs/multibytecodec.c
@@ -483,6 +483,7 @@ multibytecodec_encode(MultibyteCodec *codec,
return PyBytes_FromStringAndSize(NULL, 0);
buf.excobj = NULL;
+ buf.outobj = NULL;
buf.inbuf = buf.inbuf_top = *data;
buf.inbuf_end = buf.inbuf_top + datalen;