[Python-checkins] cpython: initialize variable for compiler happiness

benjamin.peterson python-checkins at python.org
Mon Jul 9 22:43:58 CEST 2012


http://hg.python.org/cpython/rev/7ed3b4f830c0
changeset:   78044:7ed3b4f830c0
user:        Benjamin Peterson <benjamin at python.org>
date:        Mon Jul 09 13:43:53 2012 -0700
summary:
  initialize variable for compiler happiness

files:
  Python/import.c |  5 ++---
  1 files changed, 2 insertions(+), 3 deletions(-)


diff --git a/Python/import.c b/Python/import.c
--- a/Python/import.c
+++ b/Python/import.c
@@ -1289,9 +1289,9 @@
     const char *importlib_filename = "<frozen importlib._bootstrap>";
     const char *exec_funcname = "_exec_module";
     int always_trim = 0;
-    int in_importlib;
+    int in_importlib = 0;
     PyObject *exception, *value, *base_tb, *tb;
-    PyObject **prev_link, **outer_link;
+    PyObject **prev_link, **outer_link = NULL;
 
     /* Synopsis: if it's an ImportError, we trim all importlib chunks
        from the traceback.  Otherwise, we trim only those chunks which
@@ -1306,7 +1306,6 @@
 
     prev_link = &base_tb;
     tb = base_tb;
-    in_importlib = 0;
     while (tb != NULL) {
         PyTracebackObject *traceback = (PyTracebackObject *)tb;
         PyObject *next = (PyObject *) traceback->tb_next;

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list