Core/Misc: Fix static analysis issues
Fix some static analysis issues reported by Coverity
This commit is contained in:
@@ -177,7 +177,9 @@ void WorldSession::HandlePetitionShowSignatures(WorldPackets::Petition::Petition
|
||||
signature.Choice = 0;
|
||||
signaturesPacket.Signatures.push_back(signature);
|
||||
|
||||
result->NextRow();
|
||||
// Checking the return value just to be double safe
|
||||
if (!result->NextRow())
|
||||
break;
|
||||
}
|
||||
|
||||
SendPacket(signaturesPacket.Write());
|
||||
@@ -447,7 +449,9 @@ void WorldSession::HandleOfferPetition(WorldPackets::Petition::OfferPetition& pa
|
||||
signature.Choice = 0;
|
||||
signaturesPacket.Signatures.push_back(signature);
|
||||
|
||||
result->NextRow();
|
||||
// Checking the return value just to be double safe
|
||||
if (!result->NextRow())
|
||||
break;
|
||||
}
|
||||
|
||||
player->GetSession()->SendPacket(signaturesPacket.Write());
|
||||
@@ -551,7 +555,10 @@ void WorldSession::HandleTurnInPetition(WorldPackets::Petition::TurnInPetition&
|
||||
{
|
||||
Field* fields = result->Fetch();
|
||||
guild->AddMember(ObjectGuid::Create<HighGuid::Player>(fields[0].GetUInt64()));
|
||||
result->NextRow();
|
||||
|
||||
// Checking the return value just to be double safe
|
||||
if (!result->NextRow())
|
||||
break;
|
||||
}
|
||||
|
||||
SQLTransaction trans = CharacterDatabase.BeginTransaction();
|
||||
|
||||
@@ -85,8 +85,8 @@ namespace WorldPackets
|
||||
void Read() override;
|
||||
|
||||
ObjectGuid GossipUnit;
|
||||
int32 GossipIndex;
|
||||
int32 GossipID;
|
||||
int32 GossipIndex = 0;
|
||||
int32 GossipID = 0;
|
||||
std::string PromotionCode;
|
||||
};
|
||||
|
||||
|
||||
@@ -226,8 +226,8 @@ namespace WorldPackets
|
||||
|
||||
void Read() override;
|
||||
|
||||
uint8 PackSlot;
|
||||
uint8 Slot;
|
||||
uint8 PackSlot = 0;
|
||||
uint8 Slot = 0;
|
||||
ObjectGuid CastItem;
|
||||
SpellCastRequest Cast;
|
||||
};
|
||||
|
||||
@@ -640,7 +640,7 @@ void SpellHistory::LockSpellSchool(SpellSchoolMask schoolMask, uint32 lockoutTim
|
||||
else if (Pet* petOwner = _owner->ToPet())
|
||||
{
|
||||
for (auto const& p : petOwner->m_spells)
|
||||
if (p.second.state != PLAYERSPELL_REMOVED)
|
||||
if (p.second.state != PETSPELL_REMOVED)
|
||||
knownSpells.insert(p.first);
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user