]> granicus.if.org Git - python/commitdiff
Fix gcc (4.0.x) warning about use of uninitialized variables.
authorThomas Wouters <thomas@python.org>
Wed, 1 Mar 2006 22:30:47 +0000 (22:30 +0000)
committerThomas Wouters <thomas@python.org>
Wed, 1 Mar 2006 22:30:47 +0000 (22:30 +0000)
(PyMarshal_ReadShortFromFile() is only used in zipimport.c, I don't believe
the extra initializations will matter one way or another.)

Python/marshal.c

index 4e922dc838846c3402c8c3be2fffca8e0cd2ad8f..b61436b72e2a6951328039702b628c3399ce35cd 100644 (file)
@@ -885,8 +885,9 @@ int
 PyMarshal_ReadShortFromFile(FILE *fp)
 {
        RFILE rf;
+       assert(fp);
        rf.fp = fp;
-       rf.strings = NULL;
+       rf.strings = rf.end = rf.ptr = NULL;
        return r_short(&rf);
 }