Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7f401ef

Browse files
committed
Fix gcc (4.0.x) warning about use of uninitialized variables.
(PyMarshal_ReadShortFromFile() is only used in zipimport.c, I don't believe the extra initializations will matter one way or another.)
1 parent f86d1e8 commit 7f401ef

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Python/marshal.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -885,8 +885,9 @@ int
885885
PyMarshal_ReadShortFromFile(FILE *fp)
886886
{
887887
RFILE rf;
888+
assert(fp);
888889
rf.fp = fp;
889-
rf.strings = NULL;
890+
rf.strings = rf.end = rf.ptr = NULL;
890891
return r_short(&rf);
891892
}
892893

0 commit comments

Comments
 (0)