Fix incorrect SPLog arguments

Fixes #468.
This commit is contained in:
Tomoaki Kawada 2016-12-03 22:00:46 +09:00
parent b75f0c15a0
commit ccd365b602
4 changed files with 9 additions and 4 deletions

View File

@ -81,7 +81,12 @@ namespace spades {
std::string BacktraceRecordToString(const BacktraceRecord &);
}
void StartLog();
void LogMessage(const char *file, int line, const char *format, ...);
void LogMessage(const char *file, int line, const char *format, ...)
#ifdef __GNUC__
__attribute__((format(printf, 3, 4)))
#endif
;
}
#ifdef _MSC_VER

View File

@ -1186,7 +1186,7 @@ namespace spades {
if (cat == nullptr) {
if (!currentLocaleRegion.empty()) {
SPLog("Catalog file for the locale '%s' was not found. (domain='%s')",
domainName.c_str());
currentLocaleRegion.c_str(), domainName.c_str());
}
SPLog("Using the default locale. (domain='%s')", domainName.c_str());
}

View File

@ -89,7 +89,7 @@ namespace spades {
c.cz = z;
}
SPLog("Chunk buffer allocated (%d bytes)", sizeof(Chunk) * chunkW * chunkH * chunkD);
SPLog("Chunk buffer allocated (%d bytes)", (int) sizeof(Chunk) * chunkW * chunkH * chunkD);
// make texture
texture = device->GenTexture();

View File

@ -109,7 +109,7 @@ namespace spades {
c.cz = z;
}
SPLog("Chunk buffer allocated (%d bytes)", sizeof(Chunk) * chunkW * chunkH * chunkD);
SPLog("Chunk buffer allocated (%d bytes)", (int) sizeof(Chunk) * chunkW * chunkH * chunkD);
// make texture
textureFlat = device->GenTexture();