Build: Enable -Wimplicit-fallthrough on clang (#25056)

* Misc: Use [[fallthrough]] attribute instead of comment to mark intentional fallthroughs

Related: #25006

* Misc: Add some missing breaks (no-ops) to satisfy clang

Related: #25006
Closes #25055

* Build: Enable -Wimplicit-fallthrough on clang

Closes #25006
This commit is contained in:
Peter Keresztes Schmidt
2020-07-18 20:43:16 +02:00
committed by Shauren
parent ad340466d0
commit 44ea32ace4
21 changed files with 26 additions and 1 deletions

View File

@@ -773,6 +773,7 @@ void BattlefieldWG::DoCompleteOrIncrementAchievement(uint32 achievement, Player*
case ACHIEVEMENTS_WIN_WG_100:
{
// player->UpdateCriteria();
break;
}
default:
{

View File

@@ -303,6 +303,7 @@ public:
for (GuidList::const_iterator itr = _incarceratorList.begin(); itr != _incarceratorList.end(); ++itr)
if (Creature* creature = instance->GetCreature(*itr))
creature->Respawn();
break;
default:
break;
}

View File

@@ -126,6 +126,7 @@ class instance_magisters_terrace : public InstanceMapScript
case NPC_SUNBLADE_BLOOD_KNIGHT:
if (creature->GetDistance(KaelthasTrashGroupDistanceComparisonPos) < 10.0f)
_kaelthasPreTrashGUIDs.insert(creature->GetGUID());
break;
default:
break;
}

View File

@@ -146,6 +146,7 @@ struct boss_high_inquisitor_fairbanks : public BossAI
if (Unit* target = SelectTarget(SelectTargetMethod::MaxThreat, 0, 30.f, true, false))
DoCast(target, SPELL_SLEEP);
events.Repeat(30s);
break;
default:
break;
}

View File

@@ -1485,6 +1485,7 @@ public:
chromie->AI()->Talk(RP5_LINE_CHROMIE0);
chromie->AddNpcFlag(NPCFlags(UNIT_NPC_FLAG_GOSSIP | UNIT_NPC_FLAG_QUESTGIVER));
}
break;
default:
break;
}

View File

@@ -330,8 +330,11 @@ public:
std::list<Creature*> creatureList;
GetCreatureListWithEntryInGrid(creatureList, me, NPC_BLOODMYST_TESLA_COIL, 500.0f);
if (!creatureList.empty())
{
for (std::list<Creature*>::iterator itr = creatureList.begin(); itr != creatureList.end(); ++itr)
(*itr)->InterruptNonMeleeSpells(true, SPELL_BLOODMYST_TESLA);
}
break;
}
default:
break;

View File

@@ -691,6 +691,7 @@ class boss_professor_putricide : public CreatureScript
default:
break;
}
break;
}
default:
break;

View File

@@ -352,6 +352,7 @@ class npc_big_ooze : public CreatureScript
case EVENT_STICKY_OOZE:
DoCastVictim(SPELL_STICKY_OOZE);
events.ScheduleEvent(EVENT_STICKY_OOZE, 15s);
break;
default:
break;
}

View File

@@ -815,6 +815,7 @@ public:
me->SetImmuneToPC(true);
me->DespawnOrUnsummon(30 * IN_MILLISECONDS); // just in case anything interrupts the movement
me->GetMotionMaster()->MoveTargetedHome();
break;
default:
break;
}

View File

@@ -796,6 +796,7 @@ public:
if (GameObject* coil = myCoilGO())
coil->SetGoState(GO_STATE_READY);
me->DespawnOrUnsummon(0, Hours(24 * 7));
break;
default:
break;
}

View File

@@ -357,6 +357,7 @@ class boss_flame_leviathan : public CreatureScript
case DATA_ORBIT_ACHIEVEMENTS:
if (ActiveTowers) // Only on HardMode
return ActiveTowersCount;
break;
default:
break;
}

View File

@@ -169,6 +169,7 @@ class instance_black_temple : public InstanceMapScript
break;
case DATA_AKAMA_ILLIDAN_INTRO:
AkamaIllidanIntro = data;
break;
default:
break;
}