[Python-checkins] bpo-36328: Fix compiler warning in Py_NewInterpreter() (GH-12381)

Victor Stinner webhook-mailer at python.org
Mon Mar 18 12:10:35 EDT 2019


https://github.com/python/cpython/commit/9e06d2b865beb62e54a4da39eb191f9fb8385282
commit: 9e06d2b865beb62e54a4da39eb191f9fb8385282
branch: master
author: Stéphane Wirtel <stephane at wirtel.be>
committer: Victor Stinner <vstinner at redhat.com>
date: 2019-03-18T17:10:29+01:00
summary:

bpo-36328: Fix compiler warning in Py_NewInterpreter() (GH-12381)

files:
M Python/pylifecycle.c

diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c
index c2d431c912b7..49a2f18e49fa 100644
--- a/Python/pylifecycle.c
+++ b/Python/pylifecycle.c
@@ -1434,7 +1434,7 @@ new_interpreter(PyThreadState **tstate_p)
 PyThreadState *
 Py_NewInterpreter(void)
 {
-    PyThreadState *tstate;
+    PyThreadState *tstate = NULL;
     _PyInitError err = new_interpreter(&tstate);
     if (_Py_INIT_FAILED(err)) {
         _Py_ExitInitError(err);



More information about the Python-checkins mailing list