Core: Remove "may be used uninitialized in this function", "unused parameter ‘xxx’" and "'xxx' defined but not used" warnings
--HG-- branch : trunk
This commit is contained in:
@@ -345,7 +345,7 @@ namespace VMAP
|
||||
{
|
||||
GModelRayCallback(const std::vector<MeshTriangle> &tris, const std::vector<Vector3> &vert):
|
||||
vertices(vert.begin()), triangles(tris.begin()), hit(false) {}
|
||||
bool operator()(const G3D::Ray& ray, uint32 entry, float& distance, bool pStopAtFirstHit)
|
||||
bool operator()(const G3D::Ray& ray, uint32 entry, float& distance, bool /*pStopAtFirstHit*/)
|
||||
{
|
||||
bool result = IntersectTriangle(triangles[entry], vertices, ray, distance);
|
||||
if (result) hit=true;
|
||||
|
||||
@@ -556,7 +556,7 @@ typedef UNORDERED_MAP<uint32, std::vector<CreatureEventAI_Event> > CreatureEvent
|
||||
|
||||
struct CreatureEventAI_Summon
|
||||
{
|
||||
uint32 id;
|
||||
uint32 id2;
|
||||
|
||||
float position_x;
|
||||
float position_y;
|
||||
|
||||
@@ -535,7 +535,7 @@ void AuctionHouseObject::AddAuction(AuctionEntry *auction)
|
||||
sScriptMgr.OnAuctionAdd(this, auction);
|
||||
}
|
||||
|
||||
bool AuctionHouseObject::RemoveAuction(AuctionEntry *auction, uint32 item_template)
|
||||
bool AuctionHouseObject::RemoveAuction(AuctionEntry *auction, uint32 /*item_template*/)
|
||||
{
|
||||
bool wasInMap = AuctionsMap.erase(auction->Id) ? true : false;
|
||||
|
||||
|
||||
@@ -493,7 +493,7 @@ void BattlegroundSA::TeleportPlayers()
|
||||
}
|
||||
}
|
||||
|
||||
void BattlegroundSA::EventPlayerDamagedGO(Player* plr, GameObject* go, uint8 hitType, uint32 destroyedEvent)
|
||||
void BattlegroundSA::EventPlayerDamagedGO(Player* /*plr*/, GameObject* go, uint8 hitType, uint32 destroyedEvent)
|
||||
{
|
||||
if (!go || !go->GetGOInfo())
|
||||
return;
|
||||
|
||||
@@ -1200,14 +1200,14 @@ valid examples:
|
||||
std::istringstream reader(message);
|
||||
char buffer[256];
|
||||
|
||||
uint32 color;
|
||||
uint32 color = 0;
|
||||
|
||||
ItemPrototype const* linkedItem;
|
||||
Quest const* linkedQuest;
|
||||
SpellEntry const *linkedSpell;
|
||||
AchievementEntry const* linkedAchievement;
|
||||
ItemRandomPropertiesEntry const* itemProperty;
|
||||
ItemRandomSuffixEntry const* itemSuffix;
|
||||
ItemPrototype const* linkedItem = NULL;
|
||||
Quest const* linkedQuest = NULL;
|
||||
SpellEntry const *linkedSpell = NULL;
|
||||
AchievementEntry const* linkedAchievement = NULL;
|
||||
ItemRandomPropertiesEntry const* itemProperty = NULL;
|
||||
ItemRandomSuffixEntry const* itemSuffix = NULL;
|
||||
|
||||
while (!reader.eof())
|
||||
{
|
||||
|
||||
@@ -1114,7 +1114,7 @@ bool ChatHandler::HandleReloadAuctionsCommand(const char * /*args*/)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ChatHandler::HandleReloadConditions(const char* args)
|
||||
bool ChatHandler::HandleReloadConditions(const char* /*args*/)
|
||||
{
|
||||
sLog.outString("Re-Loading Conditions...");
|
||||
sConditionMgr.LoadConditions(true);
|
||||
@@ -3536,8 +3536,8 @@ bool ChatHandler::HandleLookupFactionCommand(const char *args)
|
||||
|
||||
if (repState) // and then target != NULL also
|
||||
{
|
||||
ReputationRank rank = target->GetReputationMgr().GetRank(factionEntry);
|
||||
std::string rankName = GetTrinityString(ReputationRankStrIndex[rank]);
|
||||
uint32 index = target->GetReputationMgr().GetReputationRankStrIndex(factionEntry);
|
||||
std::string rankName = GetTrinityString(index);
|
||||
|
||||
ss << " " << rankName << "|h|r (" << target->GetReputationMgr().GetReputation(factionEntry) << ")";
|
||||
|
||||
|
||||
@@ -2586,7 +2586,7 @@ void Player::RemoveFromGroup(Group* group, uint64 guid)
|
||||
}
|
||||
}
|
||||
|
||||
void Player::SendLogXPGain(uint32 GivenXP, Unit* victim, uint32 BonusXP, bool recruitAFriend, float group_rate)
|
||||
void Player::SendLogXPGain(uint32 GivenXP, Unit* victim, uint32 BonusXP, bool recruitAFriend, float /*group_rate*/)
|
||||
{
|
||||
WorldPacket data(SMSG_LOG_XPGAIN, 21); // guess size?
|
||||
data << uint64(victim ? victim->GetGUID() : 0); // guid
|
||||
|
||||
@@ -978,7 +978,7 @@ bool LootTemplate::LootGroup::HasQuestDropForPlayer(Player const * player) const
|
||||
return false;
|
||||
}
|
||||
|
||||
void LootTemplate::LootGroup::CopyConditions(ConditionList conditions)
|
||||
void LootTemplate::LootGroup::CopyConditions(ConditionList /*conditions*/)
|
||||
{
|
||||
for (LootStoreItemList::iterator i = ExplicitlyChanced.begin(); i != ExplicitlyChanced.end(); ++i)
|
||||
{
|
||||
@@ -1114,7 +1114,7 @@ void LootTemplate::LootGroup::Verify(LootStore const& lootstore, uint32 id, uint
|
||||
}
|
||||
}
|
||||
|
||||
void LootTemplate::LootGroup::CheckLootRefs(LootTemplateMap const& store, LootIdSet* ref_set) const
|
||||
void LootTemplate::LootGroup::CheckLootRefs(LootTemplateMap const& /*store*/, LootIdSet* ref_set) const
|
||||
{
|
||||
for (LootStoreItemList::const_iterator ieItr=ExplicitlyChanced.begin(); ieItr != ExplicitlyChanced.end(); ++ieItr)
|
||||
{
|
||||
|
||||
@@ -1646,7 +1646,7 @@ float Map::GetHeight(float x, float y, float z, bool pUseVmaps, float maxSearchD
|
||||
}
|
||||
}
|
||||
|
||||
inline bool IsOutdoorWMO(uint32 mogpFlags, int32 adtId, int32 rootId, int32 groupId, WMOAreaTableEntry const* wmoEntry, AreaTableEntry const* atEntry)
|
||||
inline bool IsOutdoorWMO(uint32 mogpFlags, int32 /*adtId*/, int32 /*rootId*/, int32 /*groupId*/, WMOAreaTableEntry const* wmoEntry, AreaTableEntry const* atEntry)
|
||||
{
|
||||
bool outdoor = true;
|
||||
|
||||
|
||||
@@ -262,7 +262,9 @@ void FlightPathMovementGenerator::Finalize(Player & player)
|
||||
{
|
||||
player.clearUnitState(UNIT_STAT_IN_FLIGHT);
|
||||
|
||||
float x, y, z;
|
||||
float x = 0;
|
||||
float y = 0;
|
||||
float z = 0;
|
||||
i_destinationHolder.GetLocationNow(player.GetBaseMap(), x, y, z);
|
||||
player.SetPosition(x, y, z, player.GetOrientation());
|
||||
|
||||
|
||||
@@ -101,6 +101,10 @@ class ReputationMgr
|
||||
|
||||
ReputationRank GetRank(FactionEntry const* factionEntry) const;
|
||||
ReputationRank GetBaseRank(FactionEntry const* factionEntry) const;
|
||||
uint32 GetReputationRankStrIndex(FactionEntry const* factionEntry)
|
||||
{
|
||||
return ReputationRankStrIndex[GetRank(factionEntry)];
|
||||
};
|
||||
|
||||
ReputationRank const* GetForcedRankIfAny(FactionTemplateEntry const* factionTemplateEntry) const
|
||||
{
|
||||
|
||||
@@ -177,7 +177,7 @@ template<class TObject> class UpdatableScript
|
||||
|
||||
public:
|
||||
|
||||
virtual void OnUpdate(TObject* obj, uint32 diff) { }
|
||||
virtual void OnUpdate(TObject* /*obj*/, uint32 /*diff*/) { }
|
||||
};
|
||||
|
||||
class SpellHandlerScript : public ScriptObject
|
||||
|
||||
@@ -80,7 +80,7 @@ WorldSession::~WorldSession()
|
||||
}
|
||||
|
||||
///- empty incoming packet queue
|
||||
WorldPacket* packet;
|
||||
WorldPacket* packet = NULL;
|
||||
while (_recvQueue.next(packet))
|
||||
delete packet;
|
||||
|
||||
|
||||
@@ -6200,7 +6200,7 @@ void Spell::EffectBlock(uint32 /*i*/)
|
||||
unitTarget->ToPlayer()->SetCanBlock(true);
|
||||
}
|
||||
|
||||
void Spell::EffectLeap(uint32 i)
|
||||
void Spell::EffectLeap(uint32 /*i*/)
|
||||
{
|
||||
if (unitTarget->isInFlight())
|
||||
return;
|
||||
|
||||
@@ -1826,7 +1826,7 @@ bool SpellMgr::IsSkillTypeSpell(uint32 spellId, SkillType type) const
|
||||
}
|
||||
|
||||
// basepoints provided here have to be valid basepoints (use SpellMgr::CalculateSpellEffectBaseAmount)
|
||||
int32 SpellMgr::CalculateSpellEffectAmount(SpellEntry const * spellEntry, uint8 effIndex, Unit const * caster, int32 const * effBasePoints, Unit const * target)
|
||||
int32 SpellMgr::CalculateSpellEffectAmount(SpellEntry const * spellEntry, uint8 effIndex, Unit const * caster, int32 const * effBasePoints, Unit const * /*target*/)
|
||||
{
|
||||
float basePointsPerLevel = spellEntry->EffectRealPointsPerLevel[effIndex];
|
||||
int32 basePoints = effBasePoints ? *effBasePoints : spellEntry->EffectBasePoints[effIndex];
|
||||
|
||||
@@ -477,7 +477,7 @@ DumpReturn PlayerDumpReader::LoadDump(const std::string& file, uint32 account, s
|
||||
ROLLBACK(DUMP_FILE_BROKEN);
|
||||
}
|
||||
|
||||
DumpTableType type;
|
||||
DumpTableType type = DumpTableType(0);
|
||||
uint8 i;
|
||||
for (i = 0; i < DUMP_TABLE_COUNT; ++i)
|
||||
{
|
||||
|
||||
@@ -126,7 +126,7 @@ World::~World()
|
||||
m_sessions.erase(m_sessions.begin());
|
||||
}
|
||||
|
||||
CliCommandHolder* command;
|
||||
CliCommandHolder* command = NULL;
|
||||
while (cliCmdQueue.next(command))
|
||||
delete command;
|
||||
|
||||
@@ -2742,4 +2742,4 @@ void World::ProcessQueryCallbacks()
|
||||
_UpdateRealmCharCount(result, param);
|
||||
m_realmCharCallback.FreeResult();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ class SignalHandler : public ACE_Event_Handler
|
||||
HandleSignal(SigNum);
|
||||
return 0;
|
||||
}
|
||||
virtual void HandleSignal(int SigNum) {};
|
||||
virtual void HandleSignal(int /*SigNum*/) {};
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@ char * command_finder(const char* text, int state)
|
||||
return ((char*)NULL);
|
||||
}
|
||||
|
||||
char ** cli_completion(const char * text, int start, int end)
|
||||
char ** cli_completion(const char * text, int start, int /*end*/)
|
||||
{
|
||||
char ** matches;
|
||||
matches = (char**)NULL;
|
||||
@@ -85,7 +85,7 @@ char ** cli_completion(const char * text, int start, int end)
|
||||
}
|
||||
#endif
|
||||
|
||||
void utf8print(void* arg, const char* str)
|
||||
void utf8print(void* /*arg*/, const char* str)
|
||||
{
|
||||
#if PLATFORM == PLATFORM_WINDOWS
|
||||
wchar_t wtemp_buf[6000];
|
||||
@@ -106,7 +106,7 @@ void utf8print(void* arg, const char* str)
|
||||
#endif
|
||||
}
|
||||
|
||||
void commandFinished(void*, bool sucess)
|
||||
void commandFinished(void*, bool /*success*/)
|
||||
{
|
||||
printf("TC> ");
|
||||
fflush(stdout);
|
||||
|
||||
@@ -226,7 +226,7 @@ void RASocket::zprint(void* callbackArg, const char * szText )
|
||||
send(((RASocket*)callbackArg)->GetSocket(), szText, sz, 0);
|
||||
}
|
||||
|
||||
void RASocket::commandFinished(void* callbackArg, bool success)
|
||||
void RASocket::commandFinished(void* callbackArg, bool /*success*/)
|
||||
{
|
||||
RASocket* raSocket = (RASocket*)callbackArg;
|
||||
raSocket->Sendf("TC>");
|
||||
|
||||
Reference in New Issue
Block a user