Fixed some more warnings about unreachable code

svn-id: r44300
This commit is contained in:
Filippos Karapetis 2009-09-24 10:15:50 +00:00
parent 16d7d9ba23
commit 6b79910bcb
9 changed files with 15 additions and 11 deletions

View File

@ -782,7 +782,7 @@ bool ScriptInterpreter::execOpcode(byte opcode) {
}
return false;
//return false;
}

View File

@ -61,7 +61,7 @@ SndHandle *Sound::getHandle() {
error("Sound::getHandle(): Too many sound handles");
return NULL;
//return NULL;
}
bool Sound::isHandleActive(SndHandle *handle) {

View File

@ -628,12 +628,16 @@ private:
break;
case 0x50504C53: /* PPLS */
error("PPLS crunched files are not supported");
#if 0
eff = 8;
break;
#endif
case 0x50583230: /* PX20 */
error("PX20 crunched files are not supported");
#if 0
eff = 6;
break;
#endif
default:
eff = 0;

View File

@ -304,7 +304,7 @@ int16 ScriptVar::getValue() {
error("Parameter is not an r-value");
return 0;
//return 0;
}
void ScriptVar::setValue(int16 value) {

View File

@ -778,7 +778,7 @@ int Actor::getFrameType(ActorFrameTypes frameType) {
case kFramePickUp:
case kFrameLook:
error("Actor::getFrameType() unknown frame type %d", frameType);
return kFrameIHNMStand;
//return kFrameIHNMStand;
}
#endif
}

View File

@ -338,7 +338,7 @@ const GameDisplayInfo &SagaEngine::getDisplayInfo() {
#endif
default:
error("getDisplayInfo: Unknown game ID");
return ITE_DisplayInfo; // unreachable
//return ITE_DisplayInfo; // unreachable
}
}

View File

@ -60,7 +60,7 @@ SndHandle *Sound::getHandle() {
error("Sound::getHandle(): Too many sound handles");
return NULL;
//return NULL;
}
void Sound::playSoundBuffer(Audio::SoundHandle *handle, SoundBuffer &buffer, int volume,

View File

@ -690,7 +690,7 @@ int Logic::interpretScript(Object *compact, int id, Header *scriptModule, int sc
break;
default:
error("Invalid operator %d",scriptCode[pc-1]);
return 0;
//return 0;
}
}
}
@ -1252,7 +1252,7 @@ int Logic::fnChangeSpeechText(Object *cpt, int32 id, int32 tar, int32 width, int
//The game is halted for debugging. Maybe we'll remove this later.
int Logic::fnTalkError(Object *cpt, int32 id, int32 c, int32 d, int32 e, int32 f, int32 z, int32 x) {
error("fnTalkError for id %d, instruction %d", id, cpt->o_down_flag);
return SCRIPT_STOP;
//return SCRIPT_STOP;
}
int Logic::fnStartTalk(Object *cpt, int32 id, int32 target, int32 d, int32 e, int32 f, int32 z, int32 x) {
@ -1607,7 +1607,7 @@ int Logic::fnStopMusic(Object *cpt, int32 id, int32 a, int32 b, int32 c, int32 d
int Logic::fnInnerSpace(Object *cpt, int32 id, int32 a, int32 b, int32 c, int32 d, int32 z, int32 x) {
error("fnInnerSpace() not working.");
return SCRIPT_STOP;
//return SCRIPT_STOP;
}
int Logic::fnSetScreen(Object *cpt, int32 id, int32 target, int32 screen, int32 c, int32 d, int32 z, int32 x) {

View File

@ -325,7 +325,7 @@ int Logic::runScript2(byte *scriptData, byte *objectData, byte *offsetPtr) {
if (READ_LE_UINT32(checksumBlock) != 12345678) {
error("Invalid script in object %s", header.name);
return 0;
//return 0;
}
int32 codeLen = READ_LE_UINT32(checksumBlock + 4);
@ -754,7 +754,7 @@ int Logic::runScript2(byte *scriptData, byte *objectData, byte *offsetPtr) {
break;
default:
error("Invalid script command %d", curCommand);
return 3;
//return 3;
}
}