]> granicus.if.org Git - python/commit
Initialize a variable to make the compiler happy. (GH-9153)
authorBenjamin Peterson <benjamin@python.org>
Tue, 11 Sep 2018 22:11:06 +0000 (15:11 -0700)
committerGitHub <noreply@github.com>
Tue, 11 Sep 2018 22:11:06 +0000 (15:11 -0700)
commitacd282fd5b3ca4de302b33c9361dbc433593c4ca
tree672580037e737921e0878130507fab003cf1f363
parentc4bccd3c7617018b1ce16f95840ffe1a890d44df
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.
Python/pylifecycle.c