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/sdlcheckutils.cpp | |
parent | afbf2f713dd918bd0ff050d71afbf05bc581ab6e (diff) | |
download | manaplus-ee1a05faf157c8c9f0f43cf5b906d84f39ded497.tar.gz manaplus-ee1a05faf157c8c9f0f43cf5b906d84f39ded497.tar.bz2 manaplus-ee1a05faf157c8c9f0f43cf5b906d84f39ded497.tar.xz manaplus-ee1a05faf157c8c9f0f43cf5b906d84f39ded497.zip |
fix compilation errors and warnings in debug checkers.
Diffstat (limited to 'src/utils/sdlcheckutils.cpp')
-rw-r--r-- | src/utils/sdlcheckutils.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
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) { |