mirror of
https://github.com/AdaCore/cpython.git
synced 2026-02-12 12:57:15 -08:00
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:
committed by
GitHub
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)) {
|
||||
|
||||
Reference in New Issue
Block a user