summaryrefslogtreecommitdiff
path: root/src/utils/sdlcheckutils.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-08-28 15:53:18 +0300
committerAndrei Karas <akaras@inbox.ru>2013-08-29 00:18:56 +0300
commitee1a05faf157c8c9f0f43cf5b906d84f39ded497 (patch)
treed560c7235c09e1117dc9172867c6acb0895edd64 /src/utils/sdlcheckutils.cpp
parentafbf2f713dd918bd0ff050d71afbf05bc581ab6e (diff)
downloadmv-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/sdlcheckutils.cpp')
-rw-r--r--src/utils/sdlcheckutils.cpp12
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)
{