fix(CI/Core/ArenaSpectator): clang warnings + prevent new warnings (#3317)

Co-authored by @meerd
This commit is contained in:
Francesco Borzì
2020-08-19 19:44:07 +02:00
committed by GitHub
parent 4e4a0013bc
commit 2bc832efe3
5 changed files with 43 additions and 39 deletions

View File

@@ -92,7 +92,7 @@ namespace ArenaSpectator
{
if (!IS_PLAYER_GUID(targetGUID))
return;
SendCommand(o, "%s0x%016lX;%s=%s;", SPECTATOR_ADDON_PREFIX, targetGUID, prefix, c);
SendCommand(o, "%s0x%016llX;%s=%s;", SPECTATOR_ADDON_PREFIX, (unsigned long long)targetGUID, prefix, c);
}
template<class T>
@@ -100,7 +100,7 @@ namespace ArenaSpectator
{
if (!IS_PLAYER_GUID(targetGUID))
return;
SendCommand(o, "%s0x%016lX;%s=%u;", SPECTATOR_ADDON_PREFIX, targetGUID, prefix, t);
SendCommand(o, "%s0x%016llX;%s=%u;", SPECTATOR_ADDON_PREFIX, (unsigned long long)targetGUID, prefix, t);
}
template<class T>
@@ -108,7 +108,7 @@ namespace ArenaSpectator
{
if (!IS_PLAYER_GUID(targetGUID))
return;
SendCommand(o, "%s0x%016lX;%s=0x%016lX;", SPECTATOR_ADDON_PREFIX, targetGUID, prefix, t);
SendCommand(o, "%s0x%016llX;%s=0x%016llX;", SPECTATOR_ADDON_PREFIX, (unsigned long long)targetGUID, prefix, (unsigned long long)t);
}
template<class T>
@@ -116,7 +116,7 @@ namespace ArenaSpectator
{
if (!IS_PLAYER_GUID(targetGUID))
return;
SendCommand(o, "%s0x%016lX;%s=%u,%i;", SPECTATOR_ADDON_PREFIX, targetGUID, prefix, id, casttime);
SendCommand(o, "%s0x%016llX;%s=%u,%i;", SPECTATOR_ADDON_PREFIX, (unsigned long long)targetGUID, prefix, id, casttime);
}
template<class T>
@@ -127,7 +127,7 @@ namespace ArenaSpectator
if (const SpellInfo* si = sSpellMgr->GetSpellInfo(id))
if (si->SpellIconID == 1)
return;
SendCommand(o, "%s0x%016lX;%s=%u,%u,%u;", SPECTATOR_ADDON_PREFIX, targetGUID, prefix, id, dur, maxdur);
SendCommand(o, "%s0x%016llX;%s=%u,%u,%u;", SPECTATOR_ADDON_PREFIX, (unsigned long long)targetGUID, prefix, id, dur, maxdur);
}
template<class T>
@@ -135,7 +135,7 @@ namespace ArenaSpectator
{
if (!IS_PLAYER_GUID(targetGUID))
return;
SendCommand(o, "%s0x%016lX;%s=%u,%u,%i,%i,%u,%u,%u,0x%016lX;", SPECTATOR_ADDON_PREFIX, targetGUID, prefix, remove ? 1 : 0, stack, dur, maxdur, id, dispel, isDebuff ? 1 : 0, caster);
SendCommand(o, "%s0x%016llX;%s=%u,%u,%i,%i,%u,%u,%u,0x%016llX;", SPECTATOR_ADDON_PREFIX, (unsigned long long)targetGUID, prefix, remove ? 1 : 0, stack, dur, maxdur, id, dispel, isDebuff ? 1 : 0, (unsigned long long)caster);
}
void HandleResetCommand(Player* p)

View File

@@ -28,7 +28,6 @@ Copied events should probably have a new owner
#include "Player.h"
#include "SocialMgr.h"
#include "CalendarMgr.h"
#include "ObjectMgr.h"
#include "ObjectAccessor.h"
#include "DatabaseEnv.h"
#include "GuildMgr.h"
@@ -212,7 +211,7 @@ bool validUtf8String(WorldPacket& recvData, std::string& s, std::string action,
{
if (!utf8::is_valid(s.begin(), s.end()))
{
sLog->outString("CalendarHandler: Player with guid %lu attempt to %s an event with invalid name or description (packet modification)", playerGUID, action.c_str());
sLog->outString("CalendarHandler: Player with guid %llu attempt to %s an event with invalid name or description (packet modification)", (unsigned long long)playerGUID, action.c_str());
recvData.rfinish();
return false;
}

View File

@@ -3,7 +3,6 @@
#include "ObjectMgr.h"
#include "Chat.h"
#include "AccountMgr.h"
#include "Language.h"
#include "World.h"
#include "Player.h"
#include "Opcodes.h"