]> git.mxchange.org Git - quix0rs-blobwars.git/commitdiff
Fix new compiler warnings thrown by gcc-4.6
authorHans de Goede <hdegoede@redhat.com>
Sun, 13 Feb 2011 20:05:03 +0000 (21:05 +0100)
committerHans de Goede <hdegoede@redhat.com>
Sun, 13 Feb 2011 20:05:03 +0000 (21:05 +0100)
src/game.cpp
src/map.cpp
src/mapData.cpp

index 281fa541d1edfa67cc34f4e37d6765287f71f58c..785758b533e2e38172af8597cd8c304626a45897 100644 (file)
@@ -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))
        {
index 048e2db069c6c146970f70ca6a0b7e35b59e2b20..f31c9788dde5d013ff0e9cc08b7a073a407bef1b 100644 (file)
@@ -649,7 +649,7 @@ void parseMapDataLine(const char *line, int y)
 
                while (true)
                {
-                       *line++;
+                       line++;
 
                        if (*line == ' ')
                                break;
index 994446ec3bdc18e11360834ea589b8b9258fee5d..660cf241c1aeccfd77fd0091d80f02cea53b5058 100644 (file)
@@ -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;