mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Silence a gcc "may be used uninitialized" compiler warning. Not true.
Initializing retval prevents the naive warning.
This commit is contained in:
parent
9afe8a3306
commit
f789465eed
1 changed files with 1 additions and 0 deletions
|
@ -18,6 +18,7 @@ static PyObject *_Py_strhex_impl(const char* argbuf, const Py_ssize_t arglen,
|
||||||
retbuf = (Py_UCS1*) PyMem_Malloc(arglen*2);
|
retbuf = (Py_UCS1*) PyMem_Malloc(arglen*2);
|
||||||
if (!retbuf)
|
if (!retbuf)
|
||||||
return PyErr_NoMemory();
|
return PyErr_NoMemory();
|
||||||
|
retval = NULL; /* silence a compiler warning, assigned later. */
|
||||||
} else {
|
} else {
|
||||||
retval = PyUnicode_New(arglen*2, 127);
|
retval = PyUnicode_New(arglen*2, 127);
|
||||||
if (!retval)
|
if (!retval)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue