[Scummvm-cvs-logs] SF.net SVN: scummvm:[44774] scummvm/trunk/engines/gob/dataio.cpp

strangerke at users.sourceforge.net strangerke at users.sourceforge.net
Thu Oct 8 10:11:02 CEST 2009


Revision: 44774
          http://scummvm.svn.sourceforge.net/scummvm/?rev=44774&view=rev
Author:   strangerke
Date:     2009-10-08 08:10:57 +0000 (Thu, 08 Oct 2009)

Log Message:
-----------
gob - Fix a Valgrind warning occuring in CD games

Modified Paths:
--------------
    scummvm/trunk/engines/gob/dataio.cpp

Modified: scummvm/trunk/engines/gob/dataio.cpp
===================================================================
--- scummvm/trunk/engines/gob/dataio.cpp	2009-10-08 08:00:30 UTC (rev 44773)
+++ scummvm/trunk/engines/gob/dataio.cpp	2009-10-08 08:10:57 UTC (rev 44774)
@@ -460,7 +460,8 @@
 }
 
 byte *DataIO::getUnpackedData(const char *name) {
-	int32 realSize, packSize;
+	int32 realSize;
+	int32 packSize = -1;
 
 	realSize = getChunkSize(name, packSize);
 
@@ -552,11 +553,11 @@
 
 int32 DataIO::getDataSize(const char *name) {
 	char buf[128];
+	int32 chunkSize;
+	int32 packSize = -1;
 
 	strncpy0(buf, name, 127);
 
-	int32 chunkSize, packSize;
-
 	chunkSize = getChunkSize(buf, packSize);
 	if (chunkSize >= 0)
 		return chunkSize;


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list