diff options
| author | megamage <none@none> | 2009-03-24 17:38:14 -0600 |
|---|---|---|
| committer | megamage <none@none> | 2009-03-24 17:38:14 -0600 |
| commit | 941e5b9dbd1c1dd6056bf4d5b2b057b0043ce63c (patch) | |
| tree | 2bc2024abe3d327e568984f85e2b8247bd16ec68 /src/shared | |
| parent | cda206aacc9cdd3b9038f7cecfb9b0a71558c86f (diff) | |
[7532] Avoid warnings at use size_t with printf fromat strings. Author: VladimirMangos
--HG--
branch : trunk
Diffstat (limited to 'src/shared')
| -rw-r--r-- | src/shared/ByteBuffer.h | 8 | ||||
| -rw-r--r-- | src/shared/Database/DBCStores.cpp | 2 | ||||
| -rw-r--r-- | src/shared/Database/SqlOperations.cpp | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/src/shared/ByteBuffer.h b/src/shared/ByteBuffer.h index 5f8a584eb0f..16988632871 100644 --- a/src/shared/ByteBuffer.h +++ b/src/shared/ByteBuffer.h @@ -340,7 +340,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(" "); @@ -351,7 +351,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(" "); @@ -363,7 +363,7 @@ class ByteBuffer return; uint32 j = 1, k = 1; - sLog.outDebug("STORAGE_SIZE: %u", size() ); + sLog.outDebug("STORAGE_SIZE: %lu", (unsigned long)size() ); for(uint32 i = 0; i < size(); i++) { @@ -415,7 +415,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; diff --git a/src/shared/Database/DBCStores.cpp b/src/shared/Database/DBCStores.cpp index 6b59489f77e..ba61b028203 100644 --- a/src/shared/Database/DBCStores.cpp +++ b/src/shared/Database/DBCStores.cpp @@ -506,7 +506,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); } diff --git a/src/shared/Database/SqlOperations.cpp b/src/shared/Database/SqlOperations.cpp index 68f5759a85e..53b99359c09 100644 --- a/src/shared/Database/SqlOperations.cpp +++ b/src/shared/Database/SqlOperations.cpp @@ -97,7 +97,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; } |
