[7532] Avoid warnings at use size_t with printf fromat strings.

This commit is contained in:
VladimirMangos 2009-03-24 06:02:49 +03:00
parent b8b79d67ad
commit f4482f247f
12 changed files with 32 additions and 32 deletions

View file

@ -1310,7 +1310,7 @@ void AchievementGlobalMgr::LoadAchievementCriteriaList()
}
sLog.outString();
sLog.outString(">> Loaded %u achievement criteria.",m_AchievementCriteriasByType->size());
sLog.outString(">> Loaded %lu achievement criteria.",(unsigned long)m_AchievementCriteriasByType->size());
}
@ -1339,7 +1339,7 @@ void AchievementGlobalMgr::LoadCompletedAchievements()
delete result;
sLog.outString();
sLog.outString(">> Loaded %u realm completed achievements.",m_allCompletedAchievements.size());
sLog.outString(">> Loaded %lu realm completed achievements.",(unsigned long)m_allCompletedAchievements.size());
}
void AchievementGlobalMgr::LoadRewards()
@ -1449,7 +1449,7 @@ void AchievementGlobalMgr::LoadRewards()
delete result;
sLog.outString();
sLog.outString( ">> Loaded %u achievement reward locale strings", m_achievementRewardLocales.size() );
sLog.outString( ">> Loaded %lu achievement reward locale strings", (unsigned long)m_achievementRewardLocales.size() );
}
void AchievementGlobalMgr::LoadRewardLocales()
@ -1518,5 +1518,5 @@ void AchievementGlobalMgr::LoadRewardLocales()
delete result;
sLog.outString();
sLog.outString( ">> Loaded %u achievement reward locale strings", m_achievementRewardLocales.size() );
sLog.outString( ">> Loaded %lu achievement reward locale strings", (unsigned long)m_achievementRewardLocales.size() );
}

View file

@ -493,7 +493,7 @@ void WorldSession::HandleAuctionListBidderItems( WorldPacket & recv_data )
recv_data >> outbiddedCount;
if (recv_data.size() != (16 + outbiddedCount * 4 ))
{
sLog.outError("Client sent bad opcode!!! with count: %u and size : %d (mustbe: %d", outbiddedCount, recv_data.size(),(16 + outbiddedCount * 4 ));
sLog.outError("Client sent bad opcode!!! with count: %u and size : %lu (must be: %u)", outbiddedCount, (unsigned long)recv_data.size(),(16 + outbiddedCount * 4 ));
outbiddedCount = 0;
}

View file

@ -596,7 +596,7 @@ void Guild::CreateRank(std::string name_,uint32 rights)
// name now can be used for encoding to DB
CharacterDatabase.escape_string(name_);
CharacterDatabase.PExecute( "INSERT INTO guild_rank (guildid,rid,rname,rights) VALUES ('%u', '%u', '%s', '%u')", Id, m_ranks.size(), name_.c_str(), rights );
CharacterDatabase.PExecute( "INSERT INTO guild_rank (guildid,rid,rname,rights) VALUES ('%u', '%u', '%s', '%u')", Id, (unsigned int)m_ranks.size(), name_.c_str(), rights );
}
void Guild::AddRank(const std::string& name_,uint32 rights, uint32 money)

View file

@ -478,7 +478,7 @@ void WorldSession::HandleLootMasterGiveOpcode( WorldPacket & recv_data )
if (slotid > pLoot->items.size())
{
sLog.outDebug("AutoLootItem: Player %s might be using a hack! (slot %d, size %d)",GetPlayer()->GetName(), slotid, pLoot->items.size());
sLog.outDebug("AutoLootItem: Player %s might be using a hack! (slot %d, size %lu)",GetPlayer()->GetName(), slotid, (unsigned long)pLoot->items.size());
return;
}

View file

@ -166,7 +166,7 @@ void LootStore::LoadLootTable()
Verify(); // Checks validity of the loot store
sLog.outString();
sLog.outString( ">> Loaded %u loot definitions (%d templates)", count, m_LootTemplates.size());
sLog.outString( ">> Loaded %u loot definitions (%lu templates)", count, (unsigned long)m_LootTemplates.size());
}
else
{

View file

@ -322,7 +322,7 @@ void ObjectMgr::LoadCreatureLocales()
delete result;
sLog.outString();
sLog.outString( ">> Loaded %u creature locale strings", mCreatureLocaleMap.size() );
sLog.outString( ">> Loaded %lu creature locale strings", (unsigned long)mCreatureLocaleMap.size() );
}
void ObjectMgr::LoadNpcOptionLocales()
@ -390,7 +390,7 @@ void ObjectMgr::LoadNpcOptionLocales()
delete result;
sLog.outString();
sLog.outString( ">> Loaded %u npc_option locale strings", mNpcOptionLocaleMap.size() );
sLog.outString( ">> Loaded %lu npc_option locale strings", (unsigned long)mNpcOptionLocaleMap.size() );
}
void ObjectMgr::LoadPointOfInterestLocales()
@ -441,7 +441,7 @@ void ObjectMgr::LoadPointOfInterestLocales()
delete result;
sLog.outString();
sLog.outString( ">> Loaded %u points_of_interest locale strings", mPointOfInterestLocaleMap.size() );
sLog.outString( ">> Loaded %lu points_of_interest locale strings", (unsigned long)mPointOfInterestLocaleMap.size() );
}
struct SQLCreatureLoader : public SQLStorageLoaderBase<SQLCreatureLoader>
@ -981,7 +981,7 @@ void ObjectMgr::LoadCreatures()
delete result;
sLog.outString();
sLog.outString( ">> Loaded %u creatures", mCreatureDataMap.size() );
sLog.outString( ">> Loaded %lu creatures", (unsigned long)mCreatureDataMap.size() );
}
void ObjectMgr::AddCreatureToGrid(uint32 guid, CreatureData const* data)
@ -1108,7 +1108,7 @@ void ObjectMgr::LoadGameobjects()
delete result;
sLog.outString();
sLog.outString( ">> Loaded %u gameobjects", mGameObjectDataMap.size());
sLog.outString( ">> Loaded %lu gameobjects", (unsigned long)mGameObjectDataMap.size());
}
void ObjectMgr::AddGameobjectToGrid(uint32 guid, GameObjectData const* data)
@ -1181,7 +1181,7 @@ void ObjectMgr::LoadCreatureRespawnTimes()
delete result;
sLog.outString( ">> Loaded %u creature respawn times", mCreatureRespawnTimes.size() );
sLog.outString( ">> Loaded %lu creature respawn times", (unsigned long)mCreatureRespawnTimes.size() );
sLog.outString();
}
@ -1223,7 +1223,7 @@ void ObjectMgr::LoadGameobjectRespawnTimes()
delete result;
sLog.outString( ">> Loaded %u gameobject respawn times", mGORespawnTimes.size() );
sLog.outString( ">> Loaded %lu gameobject respawn times", (unsigned long)mGORespawnTimes.size() );
sLog.outString();
}
@ -1368,7 +1368,7 @@ void ObjectMgr::LoadItemLocales()
delete result;
sLog.outString();
sLog.outString( ">> Loaded %u Item locale strings", mItemLocaleMap.size() );
sLog.outString( ">> Loaded %lu Item locale strings", (unsigned long)mItemLocaleMap.size() );
}
struct SQLItemLoader : public SQLStorageLoaderBase<SQLItemLoader>
@ -3411,7 +3411,7 @@ void ObjectMgr::LoadQuests()
}
sLog.outString();
sLog.outString( ">> Loaded %u quests definitions", mQuestTemplates.size() );
sLog.outString( ">> Loaded %lu quests definitions", (unsigned long)mQuestTemplates.size() );
}
void ObjectMgr::LoadQuestLocales()
@ -3547,7 +3547,7 @@ void ObjectMgr::LoadQuestLocales()
delete result;
sLog.outString();
sLog.outString( ">> Loaded %u Quest locale strings", mQuestLocaleMap.size() );
sLog.outString( ">> Loaded %lu Quest locale strings", (unsigned long)mQuestLocaleMap.size() );
}
void ObjectMgr::LoadPetCreateSpells()
@ -4097,7 +4097,7 @@ void ObjectMgr::LoadPageTextLocales()
delete result;
sLog.outString();
sLog.outString( ">> Loaded %u PageText locale strings", mPageTextLocaleMap.size() );
sLog.outString( ">> Loaded %lu PageText locale strings", (unsigned long)mPageTextLocaleMap.size() );
}
struct SQLInstanceLoader : public SQLStorageLoaderBase<SQLInstanceLoader>
@ -4292,7 +4292,7 @@ void ObjectMgr::LoadNpcTextLocales()
delete result;
sLog.outString();
sLog.outString( ">> Loaded %u NpcText locale strings", mNpcTextLocaleMap.size() );
sLog.outString( ">> Loaded %lu NpcText locale strings", (unsigned long)mNpcTextLocaleMap.size() );
}
//not very fast function but it is called only once a day, or on starting-up
@ -5361,7 +5361,7 @@ void ObjectMgr::LoadGameObjectLocales()
delete result;
sLog.outString();
sLog.outString( ">> Loaded %u gameobject locale strings", mGameObjectLocaleMap.size() );
sLog.outString( ">> Loaded %lu gameobject locale strings", (unsigned long)mGameObjectLocaleMap.size() );
}
struct SQLGameObjectLoader : public SQLStorageLoaderBase<SQLGameObjectLoader>

View file

@ -56,7 +56,7 @@ void WorldSession::HandleUseItemOpcode(WorldPacket& recvPacket)
return;
}
sLog.outDetail("WORLD: CMSG_USE_ITEM packet, bagIndex: %u, slot: %u, cast_count: %u, spellid: %u, Item: %u, glyphIndex: %u, unk_flags: %u, data length = %i", bagIndex, slot, cast_count, spellid, pItem->GetEntry(), glyphIndex, unk_flags, recvPacket.size());
sLog.outDetail("WORLD: CMSG_USE_ITEM packet, bagIndex: %u, slot: %u, cast_count: %u, spellid: %u, Item: %u, glyphIndex: %u, unk_flags: %u, data length = %i", bagIndex, slot, cast_count, spellid, pItem->GetEntry(), glyphIndex, unk_flags, (uint32)recvPacket.size());
ItemPrototype const *proto = pItem->GetProto();
if(!proto)
@ -135,7 +135,7 @@ void WorldSession::HandleOpenItemOpcode(WorldPacket& recvPacket)
{
CHECK_PACKET_SIZE(recvPacket,1+1);
sLog.outDetail("WORLD: CMSG_OPEN_ITEM packet, data length = %i",recvPacket.size());
sLog.outDetail("WORLD: CMSG_OPEN_ITEM packet, data length = %i",(uint32)recvPacket.size());
Player* pUser = _player;
uint8 bagIndex, slot;
@ -247,7 +247,7 @@ void WorldSession::HandleCastSpellOpcode(WorldPacket& recvPacket)
recvPacket >> unk_flags; // flags (if 0x02 - some additional data are received)
sLog.outDebug("WORLD: got cast spell packet, spellId - %u, cast_count: %u, unk_flags %u, data length = %i",
spellId, cast_count, unk_flags, recvPacket.size());
spellId, cast_count, unk_flags, (uint32)recvPacket.size());
SpellEntry const *spellInfo = sSpellStore.LookupEntry(spellId );

View file

@ -409,7 +409,7 @@ bool Transport::GenerateWaypoints(uint32 pathid, std::set<uint32> &mapids)
uint32 timer = t;
// sLog.outDetail(" Generated %d waypoints, total time %u.", m_WayPoints.size(), timer);
// sLog.outDetail(" Generated %lu waypoints, total time %u.", (unsigned long)m_WayPoints.size(), timer);
m_curr = m_WayPoints.begin();
m_curr = GetNextWayPoint();

View file

@ -338,7 +338,7 @@ class ByteBuffer
if(!sLog.IsOutDebug()) // optimize disabled debug output
return;
sLog.outDebug("STORAGE_SIZE: %u", size() );
sLog.outDebug("STORAGE_SIZE: %lu", (unsigned long)size() );
for(uint32 i = 0; i < size(); i++)
sLog.outDebugInLine("%u - ", read<uint8>(i) );
sLog.outDebug(" ");
@ -349,7 +349,7 @@ class ByteBuffer
if(!sLog.IsOutDebug()) // optimize disabled debug output
return;
sLog.outDebug("STORAGE_SIZE: %u", size() );
sLog.outDebug("STORAGE_SIZE: %lu", (unsigned long)size() );
for(uint32 i = 0; i < size(); i++)
sLog.outDebugInLine("%c", read<uint8>(i) );
sLog.outDebug(" ");
@ -361,7 +361,7 @@ class ByteBuffer
return;
uint32 j = 1, k = 1;
sLog.outDebug("STORAGE_SIZE: %u", size() );
sLog.outDebug("STORAGE_SIZE: %lu", (unsigned long)size() );
if(sLog.IsIncludeTime())
sLog.outDebugInLine(" ");
@ -420,7 +420,7 @@ class ByteBuffer
protected:
bool PrintPosError(bool add, size_t pos, size_t esize) const
{
sLog.outError("ERROR: Attempt %s in ByteBuffer (pos: %u size: %u) value with size: %u",(add ? "put" : "get"),pos, size(), esize);
sLog.outError("ERROR: Attempt %s in ByteBuffer (pos: %lu size: %lu) value with size: %lu",(add ? "put" : "get"),(unsigned long)pos, (unsigned long)size(), (unsigned long)esize);
// assert must fail after function call
return false;

View file

@ -504,7 +504,7 @@ void LoadDBCStores(const std::string& dataPath)
for(std::list<std::string>::iterator i = bad_dbc_files.begin(); i != bad_dbc_files.end(); ++i)
str += *i + "\n";
sLog.outError("\nSome required *.dbc files (%u from %d) not found or not compatible:\n%s",bad_dbc_files.size(),DBCFilesCount,str.c_str());
sLog.outError("\nSome required *.dbc files (%u from %d) not found or not compatible:\n%s",(uint32)bad_dbc_files.size(),DBCFilesCount,str.c_str());
exit(1);
}

View file

@ -95,7 +95,7 @@ bool SqlQueryHolder::SetQuery(size_t index, const char *sql)
{
if(m_queries.size() <= index)
{
sLog.outError("Query index (%u) out of range (size: %u) for query: %s",index,m_queries.size(),sql);
sLog.outError("Query index (%u) out of range (size: %u) for query: %s",index,(uint32)m_queries.size(),sql);
return false;
}

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "7531"
#define REVISION_NR "7532"
#endif // __REVISION_NR_H__