Initialize a variable to make the compiler happy. (GH-9153)
GCC complains: Python/pylifecycle.c: In function ‘_Py_InitializeFromConfig’: Python/pylifecycle.c:900:13: warning: ‘interp’ may be used uninitialized in this function [-Wmaybe-uninitialized] err = _Py_InitializeMainInterpreter(interp, &main_config); ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This seems spurious since &interp is passed to _Py_InitializeCore. Anyway, we can easily initialize to quiet the warning.
This commit is contained in:
parent
c4bccd3c76
commit
acd282fd5b
|
@ -886,7 +886,7 @@ _Py_InitializeMainInterpreter(PyInterpreterState *interp,
|
|||
_PyInitError
|
||||
_Py_InitializeFromConfig(const _PyCoreConfig *config)
|
||||
{
|
||||
PyInterpreterState *interp;
|
||||
PyInterpreterState *interp = NULL;
|
||||
_PyInitError err;
|
||||
err = _Py_InitializeCore(&interp, config);
|
||||
if (_Py_INIT_FAILED(err)) {
|
||||
|
|
Loading…
Reference in New Issue