mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Misc: Fix static analysis issues
Fix some static analysis issues reported by Coverity
This commit is contained in:
@@ -12180,6 +12180,7 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit* target, uint32 procFlag, u
|
||||
uint32 Id = i->aura->GetId();
|
||||
|
||||
AuraApplication* aurApp = i->aura->GetApplicationOfTarget(GetGUID());
|
||||
ASSERT(aurApp);
|
||||
|
||||
bool prepare = i->aura->CallScriptPrepareProcHandlers(aurApp, eventInfo);
|
||||
|
||||
|
||||
@@ -229,7 +229,7 @@ namespace WorldPackets
|
||||
|
||||
void Read() override;
|
||||
|
||||
int32 DifficultyID;
|
||||
int32 DifficultyID = 0;
|
||||
};
|
||||
|
||||
class SetRaidDifficulty final : public ClientPacket
|
||||
@@ -239,8 +239,8 @@ namespace WorldPackets
|
||||
|
||||
void Read() override;
|
||||
|
||||
int32 DifficultyID;
|
||||
uint8 Legacy;
|
||||
int32 DifficultyID = 0;
|
||||
uint8 Legacy = 0;
|
||||
};
|
||||
|
||||
class DungeonDifficultySet final : public ServerPacket
|
||||
@@ -250,7 +250,7 @@ namespace WorldPackets
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
int32 DifficultyID;
|
||||
int32 DifficultyID = 0;
|
||||
};
|
||||
|
||||
class RaidDifficultySet final : public ServerPacket
|
||||
@@ -260,8 +260,8 @@ namespace WorldPackets
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
int32 DifficultyID;
|
||||
uint8 Legacy;
|
||||
int32 DifficultyID = 0;
|
||||
uint8 Legacy = 0;
|
||||
};
|
||||
|
||||
class CorpseReclaimDelay : public ServerPacket
|
||||
|
||||
@@ -545,7 +545,11 @@ char* DB2DatabaseLoader::Load(const char* format, int32 preparedStatement, uint3
|
||||
} while (result->NextRow());
|
||||
|
||||
if (!newRecords)
|
||||
{
|
||||
delete[] tempDataTable;
|
||||
delete[] newIndexes;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// Compact new data table to only contain new records not previously loaded from file
|
||||
char* dataTable = new char[newRecords * recordSize];
|
||||
|
||||
@@ -21,7 +21,8 @@
|
||||
#include "dbcfile.h"
|
||||
|
||||
DBCFile::DBCFile(HANDLE file) :
|
||||
_file(file), _data(NULL), _stringTable(NULL)
|
||||
_file(file), _recordSize(0), _recordCount(0), _fieldCount(0),
|
||||
_stringSize(0), _data(NULL), _stringTable(NULL)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -21,7 +21,8 @@
|
||||
#include "dbcfile.h"
|
||||
|
||||
DBCFile::DBCFile(HANDLE mpq, const char* filename) :
|
||||
_mpq(mpq), _filename(filename), _file(NULL), _data(NULL), _stringTable(NULL)
|
||||
_mpq(mpq), _filename(filename), _file(NULL), _recordSize(0), _recordCount(0),
|
||||
_fieldCount(0), _stringSize(0), _data(NULL), _stringTable(NULL)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user