From db63b401a6978d7faf1c0f3f10f7c66026a78b05 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Thu, 24 Sep 2009 09:40:12 +0000 Subject: CRUISE: Fixed some warnings about unreachable code svn-id: r44293 --- engines/cruise/dataLoader.cpp | 2 +- engines/cruise/object.cpp | 1 - engines/cruise/script.cpp | 12 +++--------- engines/cruise/volume.cpp | 5 +++-- 4 files changed, 7 insertions(+), 13 deletions(-) (limited to 'engines/cruise') diff --git a/engines/cruise/dataLoader.cpp b/engines/cruise/dataLoader.cpp index 1202d06fbc..52eba207f0 100644 --- a/engines/cruise/dataLoader.cpp +++ b/engines/cruise/dataLoader.cpp @@ -171,7 +171,7 @@ int createResFileEntry(int width, int height, int size, int resType) { 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) diff --git a/engines/cruise/object.cpp b/engines/cruise/object.cpp index 64b53d02fd..0a5a45f027 100644 --- a/engines/cruise/object.cpp +++ b/engines/cruise/object.cpp @@ -118,7 +118,6 @@ void setObjectPosition(int16 ovlIdx, int16 objIdx, int16 param3, int16 param4) { if (!ptr) { return; - ASSERT(0); } //overlayTable[param1].ovlData diff --git a/engines/cruise/script.cpp b/engines/cruise/script.cpp index 761bba3673..1e2921fe5e 100644 --- a/engines/cruise/script.cpp +++ b/engines/cruise/script.cpp @@ -97,15 +97,13 @@ int32 opcodeType0(void) { 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 @@ int32 opcodeType0(void) { } pushVar(var_16); - return (0); - - break; + return 0; } default: error("Unsupported type %d in opcodeType0", currentScriptOpcodeType); } - - return 0; } // save opcode diff --git a/engines/cruise/volume.cpp b/engines/cruise/volume.cpp index 2b8cce0f05..2c998ea61d 100644 --- a/engines/cruise/volume.cpp +++ b/engines/cruise/volume.cpp @@ -38,8 +38,8 @@ char currentBaseName[15] = ""; 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 @@ void loadPal(volumeDataStruct *entry) { fileData2 = PAL_file.readSint16BE(); PAL_ptr = (uint8 *)malloc(numLoadedPal * fileData2); +#endif } void closePal(void) { -- cgit v1.2.3