mirror of
https://github.com/mangosfour/server.git
synced 2025-12-25 22:37:04 +00:00
[7532] Avoid warnings at use size_t with printf fromat strings.
This commit is contained in:
parent
b8b79d67ad
commit
f4482f247f
12 changed files with 32 additions and 32 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "7531"
|
||||
#define REVISION_NR "7532"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue