Core/Misc: Fix some static analysis issues

Fix some static analysis issues about uninitialized values.
This commit is contained in:
jackpoz committed 2013-12-14 19:36:43 +01:00
1 parent 1c0903e286
commit ca6b9df261
5 files changed
+26 -4

No files matched your search

+13
View File
@@ -504,6 +504,7 @@ m_caster((info->AttributesEx6 & SPELL_ATTR6_CAST_BY_CHARMER && caster->GetCharme
m_applyMultiplierMask = 0;
m_auraScaleMask = 0;
memset(m_damageMultipliers, 0, sizeof(m_damageMultipliers));
// Get data for type of attack
switch (m_spellInfo->DmgClass)
@@ -559,6 +560,16 @@ m_caster((info->AttributesEx6 & SPELL_ATTR6_CAST_BY_CHARMER && caster->GetCharme
unitTarget = NULL;
itemTarget = NULL;
gameObjTarget = NULL;
destTarget = NULL;
damage = 0;
effectHandleMode = SPELL_EFFECT_HANDLE_LAUNCH;
m_diminishLevel = DIMINISHING_LEVEL_1;
m_diminishGroup = DIMINISHING_NONE;
m_damage = 0;
m_healing = 0;
m_procAttacker = 0;
m_procVictim = 0;
m_procEx = 0;
focusObject = NULL;
m_cast_count = 0;
m_glyphIndex = 0;
@@ -574,6 +585,8 @@ m_caster((info->AttributesEx6 & SPELL_ATTR6_CAST_BY_CHARMER && caster->GetCharme
m_casttime = 0; // setup to correct value in Spell::prepare, must not be used before.
m_timer = 0; // will set to castime in prepare
m_immediateHandled = false;
m_channelTargetEffectMask = 0;
// Determine if spell can be reflected back to the caster
+4 -1
View File
@@ -250,7 +250,10 @@ public:
flag96 SpellClassMask;
std::list<Condition*>* ImplicitTargetConditions;
SpellEffectInfo() { }
SpellEffectInfo() : _spellInfo(NULL), _effIndex(0), Effect(0), ApplyAuraName(0), Amplitude(0), DieSides(0),
RealPointsPerLevel(0), BasePoints(0), PointsPerComboPoint(0), ValueMultiplier(0), DamageMultiplier(0),
BonusMultiplier(0), MiscValue(0), MiscValueB(0), Mechanic(MECHANIC_NONE), RadiusEntry(NULL), ChainTarget(0),
ItemType(0), TriggerSpell(0), ImplicitTargetConditions(NULL) {}
SpellEffectInfo(SpellEntry const* spellEntry, SpellInfo const* spellInfo, uint8 effIndex);
bool IsEffect() const;
+1 -1
View File
@@ -60,7 +60,7 @@ class _SpellScript
virtual bool _Validate(SpellInfo const* entry);
public:
_SpellScript() : m_currentScriptState(SPELL_SCRIPT_STATE_NONE) { }
_SpellScript() : m_currentScriptState(SPELL_SCRIPT_STATE_NONE), m_scriptName(NULL), m_scriptSpellId(0) {}
virtual ~_SpellScript() { }
virtual void _Register();
virtual void _Unload();
+7 -1
View File
@@ -30,7 +30,13 @@
#include "Warden.h"
#include "AccountMgr.h"
Warden::Warden() : _inputCrypto(16), _outputCrypto(16), _checkTimer(10000/*10 sec*/), _clientResponseTimer(0), _dataSent(false), _initialized(false) { }
Warden::Warden() : _session(NULL), _inputCrypto(16), _outputCrypto(16), _checkTimer(10000/*10 sec*/), _clientResponseTimer(0),
_dataSent(false), _previousTimestamp(0), _module(NULL), _initialized(false)
{
memset(_inputKey, 0, sizeof(_inputKey));
memset(_outputKey, 0, sizeof(_outputKey));
memset(_seed, 0, sizeof(_seed));
}
Warden::~Warden()
{
+1 -1
View File
@@ -118,7 +118,7 @@ World::World()
mail_timer = 0;
mail_timer_expires = 0;
m_updateTime;
m_updateTime = 0;
m_updateTimeSum = 0;
m_updateTimeCount = 0;
m_currentTime = 0;