Fixed some more warnings about unreachable code

svn-id: r44299
This commit is contained in:
Filippos Karapetis 2009-09-24 10:02:13 +00:00
parent 9026b63503
commit 16d7d9ba23
11 changed files with 14 additions and 14 deletions

View File

@ -89,7 +89,7 @@ Common::Error CruiseEngine::run() {
if (!loadLanguageStrings()) {
error("Could not setup language data for your version");
return Common::kUnknownError;
//return Common::kUnknownError;
}
initialize();

View File

@ -36,10 +36,9 @@ int16 fileData2;
char currentBaseName[15] = "";
void loadPal(volumeDataStruct *entry) {
char name[20];
// This code isn't currently being used
#if 0
char name[20];
if (PAL_file.isOpen())
PAL_file.close();

View File

@ -103,8 +103,6 @@ bool DemoPlayer::play(uint32 index) {
default:
return false;
}
return false;
}
bool DemoPlayer::lineStartsWith(const Common::String &line, const char *start) {

View File

@ -204,13 +204,14 @@ void Expression::skipExpr(char stopToken) {
void Expression::printExpr(char stopToken) {
// Expression printing disabled by default
return;
#if 0
int32 savedPos = _vm->_game->_script->pos();
printExpr_internal(stopToken);
// restore IP to start of expression
_vm->_game->_script->seek(savedPos);
#endif
}
void Expression::printExpr_internal(char stopToken) {

View File

@ -263,7 +263,7 @@ uint16 Hotspots::add(const Hotspot &hotspot) {
}
error("Hotspots::add(): Hotspot array full");
return 0xFFFF;
//return 0xFFFF;
}
void Hotspots::remove(uint16 id) {

View File

@ -1309,7 +1309,7 @@ int LoLEngine::calculateCharacterStats(int charNum, int index) {
return _characters[charNum].skillLevels[index] + _characters[charNum].skillModifiers[index];
}
return 1;
//return 1;
}
int LoLEngine::calculateProtection(int index) {

View File

@ -132,7 +132,7 @@ bool Resource::reset() {
}
} else {
error("Unknown game id: %d", _vm->game());
return false;
//return false;
}
return true;
@ -191,7 +191,7 @@ bool Resource::loadFileList(const Common::String &filedata) {
} else if (!loadPakFile(filename)) {
delete f;
error("couldn't load file '%s'", filename.c_str());
return false;
//return false;
}
}
}
@ -207,7 +207,7 @@ bool Resource::loadFileList(const char * const *filelist, uint32 numFiles) {
while (numFiles--) {
if (!loadPakFile(filelist[numFiles])) {
error("couldn't load file '%s'", filelist[numFiles]);
return false;
//return false;
}
}

View File

@ -340,7 +340,7 @@ void Screen_LoK_16::getFadeParams(const Palette &pal, int delay, int &delayInc,
int Screen_LoK_16::fadePalStep(const Palette &pal, int diff) {
error("Screen_LoK_16::fadePalStep called");
return 0;
//return 0;
}
void Screen_LoK_16::paletteMap(uint8 idx, int r, int g, int b) {

View File

@ -106,7 +106,7 @@ bool EMCInterpreter::load(const char *filename, EMCData *scriptData, const Commo
Common::SeekableReadStream *stream = _vm->resource()->createReadStream(filename);
if (!stream) {
error("Couldn't open script file '%s'", filename);
return false;
//return false;
}
memset(scriptData, 0, sizeof(EMCData));

View File

@ -909,9 +909,11 @@ void Towns_EuphonyParser::parseNextEvent(EventInfo &info) {
loop = false;
} else {
error("Unknown Euphony music event 0x%02X", (int)cmd);
#if 0
memset(&info, 0, sizeof(info));
pos = 0;
loop = false;
#endif
}
}
_position._play_pos = pos;

View File

@ -178,7 +178,7 @@ char StringData::readCharacter() {
error("Unknown bit sequence encountered when decoding string");
return 0;
//return 0;
}
void StringData::getString(uint16 stringId, char *dest, const char *hotspotName,