From f789465eed2d9127fb60baad6f19f18714a604cc Mon Sep 17 00:00:00 2001 From: "Gregory P. Smith" Date: Sat, 25 Apr 2015 23:51:39 -0700 Subject: [PATCH] Silence a gcc "may be used uninitialized" compiler warning. Not true. Initializing retval prevents the naive warning. --- Python/pystrhex.c | 1 + 1 file changed, 1 insertion(+) diff --git a/Python/pystrhex.c b/Python/pystrhex.c index a20e30747b7..1259ed12dff 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)