[Python-checkins] cpython: avoid a compiler warning. the compiler doesn't know that the static

gregory.p.smith python-checkins at python.org
Sat May 21 14:19:59 CEST 2011


http://hg.python.org/cpython/rev/812b2326bf47
changeset:   70245:812b2326bf47
user:        Gregory P. Smith <greg at krypto.org>
date:        Sat May 21 05:19:42 2011 -0700
summary:
  avoid a compiler warning. the compiler doesn't know that the static
struct guarantees the loop will always be run once to initialize code.

files:
  Modules/zipimport.c |  2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)


diff --git a/Modules/zipimport.c b/Modules/zipimport.c
--- a/Modules/zipimport.c
+++ b/Modules/zipimport.c
@@ -1195,7 +1195,7 @@
 get_module_code(ZipImporter *self, PyObject *fullname,
                 int *p_ispackage, PyObject **p_modpath)
 {
-    PyObject *code, *toc_entry, *subname;
+    PyObject *code = NULL, *toc_entry, *subname;
     PyObject *path, *fullpath;
     struct st_zip_searchorder *zso;
 

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


More information about the Python-checkins mailing list