Initialize an array to quiet compiler complaining. stable-2.0
authorRyan C. Gordon <icculus@icculus.org>
Thu, 25 Mar 2010 15:58:47 -0400
branchstable-2.0
changeset 1084 ee3d2e6e1161
parent 1083 01e7571471ef
child 1087 064f8098c899
Initialize an array to quiet compiler complaining. Some versions of GCC think this can be used uninitialized. It doesn't appear to be the case, but we initialize it to keep the compiler happy. It's probably a good idea anyhow.
archivers/zip.c
--- a/archivers/zip.c	Wed Mar 24 23:51:40 2010 -0400
+++ b/archivers/zip.c	Thu Mar 25 15:58:47 2010 -0400
@@ -375,7 +375,7 @@
 static PHYSFS_sint64 zip_find_end_of_central_dir(void *in, PHYSFS_sint64 *len)
 {
     PHYSFS_uint8 buf[256];
-    PHYSFS_uint8 extra[4];
+    PHYSFS_uint8 extra[4] = { 0, 0, 0, 0 };
     PHYSFS_sint32 i = 0;
     PHYSFS_sint64 filelen;
     PHYSFS_sint64 filepos;