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

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Thu Sep 24 11:40:12 CEST 2009


Revision: 44293
          http://scummvm.svn.sourceforge.net/scummvm/?rev=44293&view=rev
Author:   thebluegr
Date:     2009-09-24 09:40:12 +0000 (Thu, 24 Sep 2009)

Log Message:
-----------
CRUISE: Fixed some warnings about unreachable code

Modified Paths:
--------------
    scummvm/trunk/engines/cruise/dataLoader.cpp
    scummvm/trunk/engines/cruise/object.cpp
    scummvm/trunk/engines/cruise/script.cpp
    scummvm/trunk/engines/cruise/volume.cpp

Modified: scummvm/trunk/engines/cruise/dataLoader.cpp
===================================================================
--- scummvm/trunk/engines/cruise/dataLoader.cpp	2009-09-24 09:01:33 UTC (rev 44292)
+++ scummvm/trunk/engines/cruise/dataLoader.cpp	2009-09-24 09:40:12 UTC (rev 44293)
@@ -171,7 +171,7 @@
 	int entryNumber;
 	int div = 0;
 
-	error("Executing untested createResFileEntry");
+	warning("Executing untested createResFileEntry");
 
 	for (i = 0; i < NUM_FILE_ENTRIES; i++) {
 		if (!filesDatabase[i].subData.ptr)

Modified: scummvm/trunk/engines/cruise/object.cpp
===================================================================
--- scummvm/trunk/engines/cruise/object.cpp	2009-09-24 09:01:33 UTC (rev 44292)
+++ scummvm/trunk/engines/cruise/object.cpp	2009-09-24 09:40:12 UTC (rev 44293)
@@ -118,7 +118,6 @@
 
 	if (!ptr) {
 		return;
-		ASSERT(0);
 	}
 	//overlayTable[param1].ovlData
 

Modified: scummvm/trunk/engines/cruise/script.cpp
===================================================================
--- scummvm/trunk/engines/cruise/script.cpp	2009-09-24 09:01:33 UTC (rev 44292)
+++ scummvm/trunk/engines/cruise/script.cpp	2009-09-24 09:40:12 UTC (rev 44293)
@@ -97,15 +97,13 @@
 		if (size == 1) {
 			address += index;
 			pushVar((int16)READ_BE_UINT16(address));
-			return (0);
+			return 0;
 		} else if (size == 2) {
 			pushVar(*address);
-			return (0);
+			return 0;
 		} else {
 			error("Unsupported code in opcodeType0 case 1");
 		}
-
-		return (0);
 	}
 	case 2: {
 		int16 var_16;
@@ -122,15 +120,11 @@
 		}
 
 		pushVar(var_16);
-		return (0);
-
-		break;
+		return 0;
 	}
 	default:
 		error("Unsupported type %d in opcodeType0", currentScriptOpcodeType);
 	}
-
-	return 0;
 }
 
 // save opcode

Modified: scummvm/trunk/engines/cruise/volume.cpp
===================================================================
--- scummvm/trunk/engines/cruise/volume.cpp	2009-09-24 09:01:33 UTC (rev 44292)
+++ scummvm/trunk/engines/cruise/volume.cpp	2009-09-24 09:40:12 UTC (rev 44293)
@@ -38,8 +38,8 @@
 void loadPal(volumeDataStruct *entry) {
 	char name[20];
 
-	// This code isn't currently being used, so return
-	return;
+	// This code isn't currently being used
+#if 0
 
 	if (PAL_file.isOpen())
 		PAL_file.close();
@@ -54,6 +54,7 @@
 	fileData2 = PAL_file.readSint16BE();
 
 	PAL_ptr = (uint8 *)malloc(numLoadedPal * fileData2);
+#endif
 }
 
 void closePal(void) {


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