aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjackpoz <giacomopoz@gmail.com>2019-03-30 17:48:36 +0100
committerShauren <shauren.trinity@gmail.com>2021-11-24 23:40:15 +0100
commit43a41caafbcd2c086a8dd9a1546ed325b466617c (patch)
tree62f99a7ce2988b0f67a58da44e1f5c6de4f7bcb2
parentad322b2b0183a6501ef65bf4dbb1bd189925220d (diff)
Core/Misc: Fix GCC 8 warnings
(cherry picked from commit 1d04a3b216901671eae0104547715a570b1ff3ab)
-rw-r--r--src/common/Logging/AppenderConsole.cpp3
-rw-r--r--src/server/database/Database/MySQLConnection.cpp4
-rw-r--r--src/server/game/DungeonFinding/LFGMgr.cpp3
-rw-r--r--src/server/game/Entities/GameObject/GameObject.cpp2
-rw-r--r--src/server/game/Entities/Unit/Unit.cpp2
-rw-r--r--src/server/game/Spells/Spell.cpp3
-rw-r--r--src/server/game/Spells/SpellInfo.cpp4
-rw-r--r--src/server/game/Spells/SpellMgr.cpp2
-rw-r--r--src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp4
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/boss_valithria_dreamwalker.cpp2
-rw-r--r--src/server/scripts/Northrend/zone_sholazar_basin.cpp2
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/shattered_halls.cpp2
12 files changed, 19 insertions, 14 deletions
diff --git a/src/common/Logging/AppenderConsole.cpp b/src/common/Logging/AppenderConsole.cpp
index baed6edc1a4..f69ed1b1494 100644
--- a/src/common/Logging/AppenderConsole.cpp
+++ b/src/common/Logging/AppenderConsole.cpp
@@ -184,7 +184,8 @@ void AppenderConsole::_write(LogMessage const* message)
case LOG_LEVEL_FATAL:
index = 0;
break;
- case LOG_LEVEL_ERROR: // No break on purpose
+ case LOG_LEVEL_ERROR:
+ /* fallthrough */
default:
index = 1;
break;
diff --git a/src/server/database/Database/MySQLConnection.cpp b/src/server/database/Database/MySQLConnection.cpp
index 4ca0f3802f4..b4c61517b8a 100644
--- a/src/server/database/Database/MySQLConnection.cpp
+++ b/src/server/database/Database/MySQLConnection.cpp
@@ -513,6 +513,7 @@ bool MySQLConnection::_HandleMySQLErrno(uint32 errNo, uint8 attempts /*= 5*/)
case CR_SERVER_GONE_ERROR:
case CR_SERVER_LOST:
case CR_SERVER_LOST_EXTENDED:
+ {
if (m_Mysql)
{
TC_LOG_ERROR("sql.sql", "Lost the connection to the MySQL server!");
@@ -520,7 +521,8 @@ bool MySQLConnection::_HandleMySQLErrno(uint32 errNo, uint8 attempts /*= 5*/)
mysql_close(m_Mysql);
m_Mysql = nullptr;
}
- /* fallthrough */
+ }
+ /* fallthrough */
case CR_CONN_HOST_ERROR:
{
TC_LOG_INFO("sql.sql", "Attempting to reconnect to the MySQL server...");
diff --git a/src/server/game/DungeonFinding/LFGMgr.cpp b/src/server/game/DungeonFinding/LFGMgr.cpp
index e2af29a4d53..696d12d0f17 100644
--- a/src/server/game/DungeonFinding/LFGMgr.cpp
+++ b/src/server/game/DungeonFinding/LFGMgr.cpp
@@ -484,8 +484,7 @@ void LFGMgr::JoinLfg(Player* player, uint8 roles, LfgDungeonSet& dungeons)
joinData.result = LFG_JOIN_INVALID_SLOT;
else
rDungeonId = (*dungeons.begin());
- // No break on purpose (Random can only be dungeon or heroic dungeon)
- /* fallthrough */
+ /* fallthrough - Random can only be dungeon or heroic dungeon */
case LFG_TYPE_HEROIC:
case LFG_TYPE_DUNGEON:
if (isRaid)
diff --git a/src/server/game/Entities/GameObject/GameObject.cpp b/src/server/game/Entities/GameObject/GameObject.cpp
index cba492cfa6d..b249f65e0c9 100644
--- a/src/server/game/Entities/GameObject/GameObject.cpp
+++ b/src/server/game/Entities/GameObject/GameObject.cpp
@@ -636,7 +636,7 @@ void GameObject::Update(uint32 diff)
break;
}
}
- /* fallthrough */
+ /* fallthrough */
case GO_READY:
{
if (m_respawnCompatibilityMode)
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index bedf0e1bddf..56b22078417 100644
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -6727,7 +6727,7 @@ float Unit::SpellCritChanceTaken(Unit const* caster, Spell* spell, AuraEffect co
}
case SPELL_DAMAGE_CLASS_MELEE:
- /// Intentional fallback. Calculate critical strike chance for both Ranged and Melee spells
+ /* fallthrough - Calculate critical strike chance for both Ranged and Melee spells*/
case SPELL_DAMAGE_CLASS_RANGED:
if (caster)
crit_chance = GetUnitCriticalChanceTaken(caster, attackType, crit_chance);
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp
index 0c4b991ef23..48fac208658 100644
--- a/src/server/game/Spells/Spell.cpp
+++ b/src/server/game/Spells/Spell.cpp
@@ -5788,8 +5788,7 @@ SpellCastResult Spell::CheckCast(bool strict, int32* param1 /*= nullptr*/, int32
case SUMMON_CATEGORY_PET:
if (!m_spellInfo->HasAttribute(SPELL_ATTR1_DISMISS_PET) && !unitCaster->GetPetGUID().IsEmpty())
return SPELL_FAILED_ALREADY_HAVE_SUMMON;
- /* fallthrough */
- // intentional, check both GetPetGUID() and GetCharmGUID for SUMMON_CATEGORY_PET
+ /* fallthrough - check both GetPetGUID() and GetCharmGUID for SUMMON_CATEGORY_PET*/
case SUMMON_CATEGORY_PUPPET:
if (!unitCaster->GetCharmedGUID().IsEmpty())
return SPELL_FAILED_ALREADY_HAVE_CHARM;
diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp
index 82d7d9ad21b..aaa735bae1b 100644
--- a/src/server/game/Spells/SpellInfo.cpp
+++ b/src/server/game/Spells/SpellInfo.cpp
@@ -186,7 +186,7 @@ uint32 SpellImplicitTargetInfo::GetExplicitTargetMask(bool& srcSet, bool& dstSet
targetMask = TARGET_FLAG_UNIT_PASSENGER;
break;
case TARGET_CHECK_RAID_CLASS:
- // nobreak;
+ /* fallthrough */
default:
targetMask = TARGET_FLAG_UNIT;
break;
@@ -2685,7 +2685,7 @@ void SpellInfo::_LoadSpellSpecific()
/// @workaround For non-stacking tracking spells (We need generic solution)
if (Id == 30645) // Gas Cloud Tracking
return SPELL_SPECIFIC_NORMAL;
- /* fallthrough */
+ /* fallthrough */
case SPELL_AURA_TRACK_RESOURCES:
case SPELL_AURA_TRACK_STEALTHED:
return SPELL_SPECIFIC_TRACKER;
diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp
index 9439579ea7e..fd1d0a882b0 100644
--- a/src/server/game/Spells/SpellMgr.cpp
+++ b/src/server/game/Spells/SpellMgr.cpp
@@ -3149,7 +3149,7 @@ void SpellMgr::LoadSpellInfoCustomAttributes()
spellEffectInfo.ApplyAuraName == SPELL_AURA_PERIODIC_HEALTH_FUNNEL ||
spellEffectInfo.ApplyAuraName == SPELL_AURA_PERIODIC_DUMMY)
break;
- /* fallthrough */
+ /* fallthrough */
default:
{
// No value and not interrupt cast or crowd control without SPELL_ATTR0_UNAFFECTED_BY_INVULNERABILITY flag
diff --git a/src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp b/src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp
index 7d9f4f98df8..28ecc3c4efc 100644
--- a/src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp
+++ b/src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp
@@ -563,7 +563,9 @@ public:
Spark->DisappearAndDie();
DespawnNagaFlag(false);
me->DisappearAndDie();
- default: return 99999999;
+ /* fallthrough */
+ default:
+ return 99999999;
}
}
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_valithria_dreamwalker.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_valithria_dreamwalker.cpp
index e78eb35a680..9e5d3f808f4 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_valithria_dreamwalker.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_valithria_dreamwalker.cpp
@@ -231,7 +231,7 @@ class ValithriaDespawner : public BasicEvent
case NPC_VALITHRIA_DREAMWALKER:
if (InstanceScript* instance = creature->GetInstanceScript())
instance->SendEncounterUnit(ENCOUNTER_FRAME_DISENGAGE, creature);
- // no break
+ /* fallthrough */
case NPC_BLAZING_SKELETON:
case NPC_SUPPRESSER:
case NPC_BLISTERING_ZOMBIE:
diff --git a/src/server/scripts/Northrend/zone_sholazar_basin.cpp b/src/server/scripts/Northrend/zone_sholazar_basin.cpp
index 5183eacd29d..565aabddb7c 100644
--- a/src/server/scripts/Northrend/zone_sholazar_basin.cpp
+++ b/src/server/scripts/Northrend/zone_sholazar_basin.cpp
@@ -534,7 +534,7 @@ public:
break;
}
}
- /* fallthrough */
+ /* fallthrough */
case EVENT_MISS:
{
shooter->CastSpell(wilhelm, SPELL_MISS_APPLE);
diff --git a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/shattered_halls.cpp b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/shattered_halls.cpp
index 383091325f2..d497edc4998 100644
--- a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/shattered_halls.cpp
+++ b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/shattered_halls.cpp
@@ -149,6 +149,8 @@ class boss_shattered_executioner : public CreatureScript
/* fallthrough */
case 1:
me->RemoveLootMode(LOOT_MODE_HARD_MODE_3);
+ /* fallthrough */
+ default:
break;
}
}