[Scummvm-cvs-logs] SF.net SVN: scummvm:[40165] scummvm/trunk/engines

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Mon Apr 27 16:40:14 CEST 2009


Revision: 40165
          http://scummvm.svn.sourceforge.net/scummvm/?rev=40165&view=rev
Author:   fingolfin
Date:     2009-04-27 14:40:14 +0000 (Mon, 27 Apr 2009)

Log Message:
-----------
Fixed some silly warnings

Modified Paths:
--------------
    scummvm/trunk/engines/gob/parse.cpp
    scummvm/trunk/engines/gob/parse_v2.cpp
    scummvm/trunk/engines/sci/engine/intmap.cpp

Modified: scummvm/trunk/engines/gob/parse.cpp
===================================================================
--- scummvm/trunk/engines/gob/parse.cpp	2009-04-27 14:25:16 UTC (rev 40164)
+++ scummvm/trunk/engines/gob/parse.cpp	2009-04-27 14:40:14 UTC (rev 40165)
@@ -458,7 +458,7 @@
 
 int Parse::cmpHelper(byte *operPtr, int32 *valPtr) {
 	byte var_C = operPtr[-3];
-	int cmpTemp;
+	int cmpTemp = 0;
 	if (var_C == OP_LOAD_IMM_INT16) {
 		cmpTemp = (int)valPtr[-3] - (int)valPtr[-1];
 	} else if (var_C == OP_LOAD_IMM_STR) {

Modified: scummvm/trunk/engines/gob/parse_v2.cpp
===================================================================
--- scummvm/trunk/engines/gob/parse_v2.cpp	2009-04-27 14:25:16 UTC (rev 40164)
+++ scummvm/trunk/engines/gob/parse_v2.cpp	2009-04-27 14:40:14 UTC (rev 40165)
@@ -797,8 +797,6 @@
 				if ((operStack[brackStart] >= OP_OR) || (operStack[brackStart] == OP_BEGIN_EXPR))
 					brackStart++;
 
-				int cmpTemp;
-
 				switch (operPtr[-2]) {
 				case OP_ADD:
 					if (operStack[brackStart] == OP_LOAD_IMM_INT16) {
@@ -913,7 +911,9 @@
 					valPtr -= 2;
 					break;
 
-				case OP_NEQ:
+				case OP_NEQ: {
+					int cmpTemp = 0;
+
 					if (operPtr[-3] == OP_LOAD_IMM_INT16) {
 						cmpTemp = valPtr[-3] - valPtr[-1];
 					} else if (operPtr[-3] == OP_LOAD_IMM_STR) {
@@ -930,6 +930,7 @@
 					operPtr -= 2;
 					valPtr -= 2;
 					break;
+					}
 
 				default:
 					var_1A = true;

Modified: scummvm/trunk/engines/sci/engine/intmap.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/intmap.cpp	2009-04-27 14:25:16 UTC (rev 40164)
+++ scummvm/trunk/engines/sci/engine/intmap.cpp	2009-04-27 14:40:14 UTC (rev 40165)
@@ -111,7 +111,7 @@
 void IntMapper::saveLoadWithSerializer(Common::Serializer &s) {
 	s.syncAsSint32LE(base_value);
 	if (s.isLoading()) {
-		uint32 key, idx;
+		uint32 key = 0, idx = 0;
 		clear();
 		while (true) {
 			s.syncAsSint32LE(key);


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