diff options
author | Spp <none@none> | 2010-09-06 15:23:08 +0200 |
---|---|---|
committer | Spp <none@none> | 2010-09-06 15:23:08 +0200 |
commit | cdef980af41b833ee654405a66b921f611fb5080 (patch) | |
tree | b6dcaf95798c1d9ff8d10706effe3c638bc298d6 /src | |
parent | 588092960bf6378b89bf1d82c4dbc9217f0a0ac4 (diff) |
Core: Fix some warnings
--HG--
branch : trunk
Diffstat (limited to 'src')
10 files changed, 21 insertions, 22 deletions
diff --git a/src/server/game/DungeonFinding/LFGMgr.cpp b/src/server/game/DungeonFinding/LFGMgr.cpp index 8093b36652d..467e7a79d65 100644 --- a/src/server/game/DungeonFinding/LFGMgr.cpp +++ b/src/server/game/DungeonFinding/LFGMgr.cpp @@ -2135,7 +2135,6 @@ LfgReward const* LFGMgr::GetRandomDungeonReward(uint32 dungeon, uint8 level) { LfgReward const* rew = NULL; LfgRewardMapBounds bounds = m_RewardMap.equal_range(dungeon & 0x00FFFFFF); - uint8 index = 0; for (LfgRewardMap::const_iterator itr = bounds.first; itr != bounds.second; ++itr) { rew = itr->second; @@ -2199,4 +2198,4 @@ std::string LFGMgr::ConcatenateGuids(LfgGuidList check) o << "|" << *it; guidSet.clear(); return o.str(); -}
\ No newline at end of file +} diff --git a/src/server/game/DungeonFinding/LFGMgr.h b/src/server/game/DungeonFinding/LFGMgr.h index 90fbfca0d29..9edb5c666ab 100644 --- a/src/server/game/DungeonFinding/LFGMgr.h +++ b/src/server/game/DungeonFinding/LFGMgr.h @@ -275,7 +275,7 @@ class LFGMgr void LoadDungeonEncounters(); void LoadRewards(); void RewardDungeonDoneFor(const uint32 dungeonId, Player* player); - const uint32 GetDungeonIdForAchievement(uint32 achievementId) + uint32 GetDungeonIdForAchievement(uint32 achievementId) { std::map<uint32, uint32>::iterator itr = m_EncountersByAchievement.find(achievementId); if (itr != m_EncountersByAchievement.end()) diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 8fbec2eefb2..6c8a57b5768 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -101,8 +101,8 @@ static bool procPrepared = InitTriggerAuraData(); Unit::Unit(): WorldObject(), m_movedPlayer(NULL), IsAIEnabled(false), NeedChangeAI(false), m_ControlledByPlayer(false), i_AI(NULL), i_disabledAI(NULL), m_procDeep(0), -m_removedAurasCount(0), m_vehicle(NULL), m_vehicleKit(NULL), m_unitTypeMask(UNIT_MASK_NONE), -m_ThreatManager(this), i_motionMaster(this), m_HostileRefManager(this) +m_removedAurasCount(0), m_vehicle(NULL), i_motionMaster(this), m_vehicleKit(NULL), +m_ThreatManager(this), m_unitTypeMask(UNIT_MASK_NONE), m_HostileRefManager(this) { #ifdef _MSC_VER #pragma warning(default:4355) diff --git a/src/server/game/Scripting/ScriptMgr.h b/src/server/game/Scripting/ScriptMgr.h index d61d5252bed..619c9e9bfd5 100644 --- a/src/server/game/Scripting/ScriptMgr.h +++ b/src/server/game/Scripting/ScriptMgr.h @@ -686,7 +686,7 @@ public: virtual void OnTextEmote(Player* /*player*/, uint32 /*text_emote*/, uint32 /*emoteNum*/, uint64 /*guid*/) { } // Called in Spell::cast - virtual void OnSpellCast(Player *player, Spell *spell, bool skipCheck) { } + virtual void OnSpellCast(Player * /*player*/, Spell * /*spell*/, bool /*skipCheck*/) { } }; class GuildScript : public ScriptObject diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_festergut.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_festergut.cpp index 26a64cedea7..5b760f79546 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_festergut.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_festergut.cpp @@ -304,7 +304,7 @@ class npc_stinky_icc : public CreatureScript DoMeleeAttackIfReady(); } - void JustDied(Unit* who) + void JustDied(Unit* /*who*/) { uint64 festergutGUID = pInstance ? pInstance->GetData64(DATA_FESTERGUT) : 0; if (Creature *festergut = me->GetCreature(*me, festergutGUID)) @@ -329,7 +329,7 @@ class spell_festergut_pungent_blight : public SpellScriptLoader class spell_festergut_pungent_blight_SpellScript : public SpellScript { - void HandleScript(SpellEffIndex effIndex) + void HandleScript(SpellEffIndex /*effIndex*/) { SpellEntry const* spellInfo = sSpellStore.LookupEntry(GetEffectValue()); if (!spellInfo) @@ -362,7 +362,7 @@ class spell_festergut_gastric_bloat : public SpellScriptLoader class spell_festergut_gastric_bloat_SpellScript : public SpellScript { - void HandleScript(SpellEffIndex effIndex) + void HandleScript(SpellEffIndex /*effIndex*/) { Aura const* aura = GetHitUnit()->GetAura(GetSpellInfo()->Id); if (!(aura && aura->GetStackAmount() == 10)) diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp index c5c88c7935a..e18c468e432 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp @@ -183,7 +183,7 @@ class spell_stinky_precious_decimate : public SpellScriptLoader class spell_stinky_precious_decimate_SpellScript : public SpellScript { - void HandleScript(SpellEffIndex effIndex) + void HandleScript(SpellEffIndex /*effIndex*/) { if (GetHitUnit()->GetHealthPct() > float(GetEffectValue())) { diff --git a/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp b/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp index 0645c59ff42..3cfae354b30 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp @@ -50,7 +50,7 @@ class instance_icecrown_citadel : public InstanceMapScript uiSaurfangTeleport = 0; memset(uiPutricidePipes, 0, 2*sizeof(uint32)); memset(uiPutricideGates, 0, 2*sizeof(uint32)); - uiPutricideCollision; + uiPutricideCollision = 0; uiFestergut = 0; uiRotface = 0; uiProfessorPutricide = 0; diff --git a/src/server/scripts/Spells/spell_item.cpp b/src/server/scripts/Spells/spell_item.cpp index 8c431f338f0..b9891757e8d 100644 --- a/src/server/scripts/Spells/spell_item.cpp +++ b/src/server/scripts/Spells/spell_item.cpp @@ -541,19 +541,19 @@ public: uint32 spellId = 0; uint32 rand = urand(0, 100); - if (rand >= 0 && rand < 25) // Fireball (25% chance) + if (rand < 25) // Fireball (25% chance) spellId = SPELL_FIREBALL; - else if (rand >= 25 && rand < 50) // Frostball (25% chance) + else if (rand < 50) // Frostball (25% chance) spellId = SPELL_FROSTBOLT; - else if (rand >= 50 && rand < 70) // Chain Lighting (20% chance) + else if (rand < 70) // Chain Lighting (20% chance) spellId = SPELL_CHAIN_LIGHTNING; - else if (rand >= 70 && rand < 80) // Polymorph (10% chance) + else if (rand < 80) // Polymorph (10% chance) { spellId = SPELL_POLYMORPH; if (urand(0, 100) <= 30) // 30% chance to self-cast pTarget = pCaster; } - else if (rand >=80 && rand < 95) // Enveloping Winds (15% chance) + else if (rand < 95) // Enveloping Winds (15% chance) spellId = SPELL_ENVELOPING_WINDS; else // Summon Felhund minion (5% chance) { diff --git a/src/server/scripts/World/chat_log.cpp b/src/server/scripts/World/chat_log.cpp index 5b26a722305..330cf63adff 100644 --- a/src/server/scripts/World/chat_log.cpp +++ b/src/server/scripts/World/chat_log.cpp @@ -55,14 +55,14 @@ public: } } - void OnChat(Player *player, uint32 type, uint32 lang, std::string msg, Player *receiver) + void OnChat(Player *player, uint32 /*type*/, uint32 /*lang*/, std::string msg, Player *receiver) { if (sWorld.getBoolConfig(CONFIG_CHATLOG_WHISPER)) sLog.outChat("[WHISPER] Player %s tells %s: %s", player->GetName(), receiver ? receiver->GetName() : "<unknown>", msg.c_str()); } - void OnChat(Player *player, uint32 type, uint32 lang, std::string msg, Group *group) + void OnChat(Player *player, uint32 type, uint32 /*lang*/, std::string msg, Group *group) { switch (type) { @@ -131,7 +131,7 @@ public: } } - void OnChat(Player *player, uint32 type, uint32 lang, std::string msg, Channel *channel) + void OnChat(Player *player, uint32 /*type*/, uint32 /*lang*/, std::string msg, Channel *channel) { bool isSystem = channel && (channel->HasFlag(CHANNEL_FLAG_TRADE) || diff --git a/src/server/shared/Database/PreparedStatement.cpp b/src/server/shared/Database/PreparedStatement.cpp index 920952d2f8c..59e33ce8141 100644 --- a/src/server/shared/Database/PreparedStatement.cpp +++ b/src/server/shared/Database/PreparedStatement.cpp @@ -21,8 +21,8 @@ #include "Log.h" PreparedStatement::PreparedStatement(uint32 index) : -m_index(index), -m_stmt(NULL) +m_stmt(NULL), +m_index(index) { } @@ -183,7 +183,7 @@ m_bind(NULL) memset(m_bind, 0, sizeof(MYSQL_BIND)*m_paramCount); /// "If set to 1, causes mysql_stmt_store_result() to update the metadata MYSQL_FIELD->max_length value." - my_bool bool_tmp = 1; + my_bool bool_tmp = 1; mysql_stmt_attr_set(stmt, STMT_ATTR_UPDATE_MAX_LENGTH, &bool_tmp); } |