summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorGregory P. Smith <greg@krypto.org>2015-04-26 06:51:39 (GMT)
committerGregory P. Smith <greg@krypto.org>2015-04-26 06:51:39 (GMT)
commitf789465eed2d9127fb60baad6f19f18714a604cc (patch)
treea6ebb6c7701f52a52e5593a4c4b65cbce29c1204 /Python
parent9afe8a330664fa8c301e770cc5123c2902b6a77d (diff)
downloadcpython-f789465eed2d9127fb60baad6f19f18714a604cc.zip
cpython-f789465eed2d9127fb60baad6f19f18714a604cc.tar.gz
cpython-f789465eed2d9127fb60baad6f19f18714a604cc.tar.bz2
Silence a gcc "may be used uninitialized" compiler warning. Not true.
Initializing retval prevents the naive warning.
Diffstat (limited to 'Python')
-rw-r--r--Python/pystrhex.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Python/pystrhex.c b/Python/pystrhex.c
index a20e3074..1259ed1 100644
--- a/Python/pystrhex.c
+++ b/Python/pystrhex.c
@@ -18,6 +18,7 @@ static PyObject *_Py_strhex_impl(const char* argbuf, const Py_ssize_t arglen,
retbuf = (Py_UCS1*) PyMem_Malloc(arglen*2);
if (!retbuf)
return PyErr_NoMemory();
+ retval = NULL; /* silence a compiler warning, assigned later. */
} else {
retval = PyUnicode_New(arglen*2, 127);
if (!retval)