diff options
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) { |