Silence compiler warnings about intentional switch fallthrough

This commit is contained in:
sirlemonhead 2019-12-02 14:56:24 +00:00 committed by Christoph Oelckers
parent 5b82f519ff
commit c4b9137ee1
16 changed files with 19 additions and 0 deletions

View file

@ -248,6 +248,7 @@ void FuncAnubis(int a, int nDamage, int nRun)
break; // only break if condition met
}
// else we fall through to 0x8000
fallthrough__;
}
case 0x8000:
{
@ -406,6 +407,7 @@ void FuncAnubis(int a, int nDamage, int nRun)
}
nDamage = runlist_CheckRadialDamage(nSprite);
fallthrough__;
}
case 0x80000:
{

View file

@ -351,6 +351,7 @@ void FuncFish(int a, int nDamage, int nRun)
FishList[nFish].field_C = 10;
}
// fall through
fallthrough__;
}
case 0x80000:
{

View file

@ -827,6 +827,7 @@ loc_flag:
}
// fall through to case 1 (kWeaponPistol)
fallthrough__;
}
}
@ -836,6 +837,7 @@ loc_flag:
nQuake[nPlayer] = 128;
}
// fall through
fallthrough__;
}
case kWeaponPistol:
{

View file

@ -481,6 +481,7 @@ void ProcessSpriteTag(short nSprite, short lotag, short hitag)
{
nVal = 3 * (hitag / 3);
// fall through to 6,7 etc
fallthrough__;
}
case 6:
case 7:

View file

@ -152,6 +152,7 @@ void FuncLion(int a, int nDamage, int nRun)
{
nDamage = runlist_CheckRadialDamage(nSprite);
// now fall through to 0x80000
fallthrough__;
}
case 0x80000:
{

View file

@ -479,6 +479,7 @@ void FuncMummy(int a, int nDamage, int nRun)
nDamage = runlist_CheckRadialDamage(nSprite);
// fall through to 0x80000
fallthrough__;
}
case 0x80000:
{

View file

@ -1791,6 +1791,7 @@ void FuncEnergyBlock(int a, int nDamage, int nRun)
}
// fall through to case 0x80000
fallthrough__;
}
case 0x80000:

View file

@ -1103,6 +1103,7 @@ void FuncPlayer(int pA, int nDamage, int nRun)
nSprite2 = nRadialOwner;
// fall through to case 0x80000
fallthrough__;
}
case 0x80000:

View file

@ -199,6 +199,7 @@ void FuncRat(int a, int nDamage, int nRun)
{
nDamage = runlist_CheckRadialDamage(nSprite);
// fall through to 0x80000
fallthrough__;
}
case 0x80000:
{

View file

@ -156,6 +156,7 @@ void FuncRex(int a, int nDamage, int nRun)
nDamage = runlist_CheckRadialDamage(nSprite);
}
// fall through to case 0x80000
fallthrough__;
}
case 0x80000:

View file

@ -163,6 +163,7 @@ void FuncRoach(int a, int nDamage, int nRun)
case 0xA0000: // fall through to next case
{
nDamage = runlist_CheckRadialDamage(nSprite);
fallthrough__;
}
case 0x80000:
{

View file

@ -1311,6 +1311,7 @@ void runlist_ProcessSectorTag(int nSector, int lotag, int hitag)
runlist_AddRunRec(sRunChannels[nChannel].a, nSwitch);
// Fall through to case 62
fallthrough__;
}
case 62:
{

View file

@ -159,6 +159,7 @@ void FuncScorp(int a, int nDamage, int nRun)
return;
}
// else fall through to case 0x80000
fallthrough__;
}
case 0x80000:

View file

@ -250,6 +250,7 @@ void FuncSet(int a, int nDamage, int nRun)
nDamage = runlist_CheckRadialDamage(nSprite);
// fall through to case 0x80000
}
fallthrough__;
}
case 0x80000:

View file

@ -212,6 +212,7 @@ goto case_3;
SpiderList[nSpider].nAction = 1;
}
//break; // fall through
fallthrough__;
}
case 3:
{
@ -388,6 +389,7 @@ case_3:
nDamage = runlist_CheckRadialDamage(nSprite);
// fall through
fallthrough__;
}
case 0x80000:

View file

@ -192,6 +192,7 @@ void FuncWasp(int a, int nDamage, int nRun)
nDamage = runlist_CheckRadialDamage(nSprite);
// fall through to case 0x80000
fallthrough__;
}
case 0x80000: