]> granicus.if.org Git - python/commitdiff
avoid a compiler warning. the compiler doesn't know that the static
authorGregory P. Smith <greg@krypto.org>
Sat, 21 May 2011 12:19:42 +0000 (05:19 -0700)
committerGregory P. Smith <greg@krypto.org>
Sat, 21 May 2011 12:19:42 +0000 (05:19 -0700)
struct guarantees the loop will always be run once to initialize code.

Modules/zipimport.c

index 6b125c235f49bf2d181258ed28c6ff0bdb9b271c..de89a7699022acad5fffa0e4f0cc7c361d919809 100644 (file)
@@ -1195,7 +1195,7 @@ static PyObject *
 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;