Silenced some harmless cppcheck warnings about unreachable code after a return.
In this case, it was always a break after a return in a switch case. There are similar cases which cppcheck didn't detect, and a couple of cases where we have a break after a continue in a switch case (where the continue refers to an outer loop), but I didn't touch those. Not yet, at least. svn-id: r48218
This commit is contained in:
parent
fc50408ce3
commit
65585f6433
12 changed files with 1 additions and 16 deletions
|
@ -81,8 +81,6 @@ bool Troll::getMenuSel(const char *szMenu, int *iSel, int nSel) {
|
|||
inventory();
|
||||
|
||||
return false;
|
||||
|
||||
break;
|
||||
case Common::KEYCODE_DOWN:
|
||||
case Common::KEYCODE_SPACE:
|
||||
*iSel += 1;
|
||||
|
|
|
@ -769,7 +769,6 @@ int AGOSEngine_PN::varval() {
|
|||
case 249:
|
||||
b = readfromline();
|
||||
return (int)(b + 256 * readfromline());
|
||||
break;
|
||||
case 250:
|
||||
return readfromline();
|
||||
case 251:
|
||||
|
|
|
@ -253,12 +253,9 @@ int loadFile(const char* name, int idx, int destIdx) {
|
|||
return 0; // exit if limit is reached
|
||||
}
|
||||
return loadSetEntry(name, ptr, destIdx, idx);
|
||||
|
||||
break;
|
||||
}
|
||||
case type_FNT: {
|
||||
return loadFNTSub(ptr, idx);
|
||||
break;
|
||||
}
|
||||
case type_SPL: {
|
||||
// Sound file
|
||||
|
|
|
@ -308,7 +308,6 @@ int playerMenu(int menuX, int menuY) {
|
|||
break;
|
||||
case 7: // exit
|
||||
return 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -508,7 +508,6 @@ bool GobEngine::initGameParts() {
|
|||
default:
|
||||
deinitGameParts();
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
|
||||
_inter->setupOpcodes();
|
||||
|
|
|
@ -604,11 +604,9 @@ uint8 KyraEngine_v1::getVolume(kVolumeEntry vol) {
|
|||
switch (vol) {
|
||||
case kVolumeMusic:
|
||||
return convertVolumeFromMixer(ConfMan.getInt("music_volume"));
|
||||
break;
|
||||
|
||||
case kVolumeSfx:
|
||||
return convertVolumeFromMixer(ConfMan.getInt("sfx_volume"));
|
||||
break;
|
||||
|
||||
case kVolumeSpeech:
|
||||
if (speechEnabled())
|
||||
|
|
|
@ -773,7 +773,6 @@ int LoLEngine::getMonsterCurFrame(MonsterInPlay *m, uint16 dirFlags) {
|
|||
break;
|
||||
case 2:
|
||||
return (m->fightCurTick >= 13) ? 13 : m->fightCurTick;
|
||||
break;
|
||||
case 3:
|
||||
switch (m->mode) {
|
||||
case 5:
|
||||
|
|
|
@ -573,7 +573,7 @@ void DragonMainMenuView::handleAction(MadsGameAction action) {
|
|||
case EXIT:
|
||||
vm->_events->quitFlag = true;
|
||||
return;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -771,7 +771,6 @@ void Anim::decodeFrame(AnimationData *anim, size_t frameOffset, byte *buf, size_
|
|||
break;
|
||||
case SAGA_FRAME_END: // End of frame marker
|
||||
return;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -238,7 +238,6 @@ reg_t kGraph(EngineState *s, int argc, reg_t *argv) {
|
|||
if (g_sci->getResMan()->isAmiga32color())
|
||||
return make_reg(0, 32);
|
||||
return make_reg(0, !g_sci->getResMan()->isVGA() ? 16 : 256);
|
||||
break;
|
||||
|
||||
case K_GRAPH_DRAW_LINE:
|
||||
priority = (argc > 6) ? argv[6].toSint16() : -1;
|
||||
|
|
|
@ -547,7 +547,6 @@ static reg_t pointer_add(EngineState *s, reg_t base, int offset) {
|
|||
case SEG_TYPE_DYNMEM:
|
||||
base.offset += offset;
|
||||
return base;
|
||||
break;
|
||||
|
||||
default:
|
||||
// FIXME: Changed this to warning, because iceman does this during dancing with girl.
|
||||
|
|
|
@ -368,7 +368,6 @@ byte *ScummEngine::get2byteCharPtr(int idx) {
|
|||
}
|
||||
|
||||
return _2byteFontPtr + base;
|
||||
break;
|
||||
}
|
||||
case Common::ZH_CNA:
|
||||
idx = ((idx % 256) - 0xa1)* 94 + ((idx / 256) - 0xa1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue