From 2e0e38f70b6f8843b474db20da5ea828b31d52b3 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Sun, 13 Feb 2011 21:05:03 +0100 Subject: [PATCH] Fix new compiler warnings thrown by gcc-4.6 --- src/game.cpp | 6 ++++-- src/map.cpp | 2 +- src/mapData.cpp | 4 ++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/game.cpp b/src/game.cpp index 281fa54..785758b 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -569,11 +569,11 @@ int doGame() SDL_FillRect(graphics.screen, NULL, graphics.black); graphics.delay(1000); - Uint32 then, frames, frameLimit, millis, frameCounter; + Uint32 then, frames, frameLimit, millis; Uint32 start, cur; #if DEBUG - Uint32 now; + Uint32 now, frameCounter; char fps[10]; strlcpy(fps, "fps", sizeof fps); #endif @@ -619,7 +619,9 @@ int doGame() frameLimit = SDL_GetTicks() + 16; frames = millis = 0; start = then = SDL_GetTicks(); +#ifdef DEBUG frameCounter = SDL_GetTicks(); +#endif if ((strcmp(map.name, "Space Station") == 0) && (!game.continueFromCheckPoint)) { diff --git a/src/map.cpp b/src/map.cpp index 048e2db..f31c978 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -649,7 +649,7 @@ void parseMapDataLine(const char *line, int y) while (true) { - *line++; + line++; if (*line == ' ') break; diff --git a/src/mapData.cpp b/src/mapData.cpp index 994446e..660cf24 100644 --- a/src/mapData.cpp +++ b/src/mapData.cpp @@ -273,7 +273,7 @@ void getMapTokens() else if (strcmp("ALPHATILES", mapEntity) == 0) { for (int i = 0 ; i < 15 ; i++) - *token++; + token++; while (true) { @@ -288,7 +288,7 @@ void getMapTokens() while (true) { - *token++; + token++; if (*token == ' ') break; -- 2.39.5