Core/Misc: Fix some static analysis issues
Fix some static analysis issues about: - uninitialized values, most of which are false positives, always initialized before being accessed - unchecked return values - dead code never executed - bad formatting leading to wrong behavior Please ensure EventMap is never used with event id set to 0 or those events will never execute.
This commit is contained in:
1 parent
409f4bffd5
commit
6dcd8c8545
17 files changed
+85
-19
No files matched your search
@@ -5120,6 +5120,7 @@ SpellCastResult Spell::CheckCast(bool strict)
|
||||
case SUMMON_CATEGORY_PET:
|
||||
if (m_caster->GetPetGUID())
|
||||
return SPELL_FAILED_ALREADY_HAVE_SUMMON;
|
||||
// intentional missing break, check both GetPetGUID() and GetCharmGUID for SUMMON_CATEGORY_PET
|
||||
case SUMMON_CATEGORY_PUPPET:
|
||||
if (m_caster->GetCharmGUID())
|
||||
return SPELL_FAILED_ALREADY_HAVE_CHARM;
|
||||
|
||||
Reference in new issue
Block a user