diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-08-28 15:53:18 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-08-29 00:18:56 +0300 |
commit | ee1a05faf157c8c9f0f43cf5b906d84f39ded497 (patch) | |
tree | d560c7235c09e1117dc9172867c6acb0895edd64 /src/utils | |
parent | afbf2f713dd918bd0ff050d71afbf05bc581ab6e (diff) | |
download | mv-ee1a05faf157c8c9f0f43cf5b906d84f39ded497.tar.gz mv-ee1a05faf157c8c9f0f43cf5b906d84f39ded497.tar.bz2 mv-ee1a05faf157c8c9f0f43cf5b906d84f39ded497.tar.xz mv-ee1a05faf157c8c9f0f43cf5b906d84f39ded497.zip |
fix compilation errors and warnings in debug checkers.
Diffstat (limited to 'src/utils')
-rw-r--r-- | src/utils/fuzzer.cpp | 1 | ||||
-rw-r--r-- | src/utils/sdlcheckutils.cpp | 12 |
2 files changed, 8 insertions, 5 deletions
diff --git a/src/utils/fuzzer.cpp b/src/utils/fuzzer.cpp index 4342899c3..42468d6b0 100644 --- a/src/utils/fuzzer.cpp +++ b/src/utils/fuzzer.cpp @@ -40,6 +40,7 @@ void Fuzzer::init() fuzz = new Logger; fuzz->setLogFile(client->getLocalDataDirectory() + "/fuzzer.log"); unsigned int sr = time(nullptr); + fuzz->log("Srand: %u", sr); srand(sr); } diff --git a/src/utils/sdlcheckutils.cpp b/src/utils/sdlcheckutils.cpp index d8e902e4f..755f9553a 100644 --- a/src/utils/sdlcheckutils.cpp +++ b/src/utils/sdlcheckutils.cpp @@ -33,7 +33,7 @@ #include "debug.h" -// #define DEBUG_SURFACE_ALLOCATION 1 +#define DEBUG_SURFACE_ALLOCATION 1 struct SurfaceObject { @@ -85,7 +85,7 @@ static SDL_Surface *addSurface(const char *const name, return surface; } -static void deleteSurface(const char *const name, +static void deleteSurface(const char *const name A_UNUSED, SDL_Surface *const surface, const char *const file, const unsigned line) @@ -97,7 +97,8 @@ static void deleteSurface(const char *const name, it = mSurfaces.find(surface); if (it == mSurfaces.end()) { - logger->log("bad surface delete: %p at %s:%d", surface, file, line); + logger->log("bad surface delete: %p at %s:%d", + static_cast<void*>(surface), file, line); } else { @@ -113,8 +114,9 @@ static void deleteSurface(const char *const name, if (cnt < 1) { // surface was here but was deleted logger->log("deleting already deleted surface: %p at %s:%d\n" - "was add %s\nwas deleted %s", surface, file, line, - obj->mAddFile.c_str(), obj->mRemoveFile.c_str()); + "was add %s\nwas deleted %s", static_cast<void*>(surface), + file, line, obj->mAddFile.c_str(), + obj->mRemoveFile.c_str()); } else if (cnt == 1) { |