]> git.itanic.dy.fi Git - sdl-planets/commitdiff
Fix some compiler warnings
authorTimo Kokkonen <kaapeli@itanic.dy.fi>
Sat, 20 Mar 2010 15:09:59 +0000 (17:09 +0200)
committerTimo Kokkonen <kaapeli@itanic.dy.fi>
Sat, 20 Mar 2010 15:09:59 +0000 (17:09 +0200)
Signed-off-by: Timo Kokkonen <kaapeli@itanic.dy.fi>
main.c
planet.c

diff --git a/main.c b/main.c
index 61d61879d5eaeab8ef8b30ca62811688e6a95b99..72b9744b70d6f0f9389e48888e73556627f05443 100644 (file)
--- a/main.c
+++ b/main.c
@@ -97,7 +97,7 @@ static void loop(SDL_Surface *screen, int num_of_planets, double total_mass,
 {
        struct planet *planet, *pl1, *pl2;
        struct camera camera;
-       int i, planets;
+       int planets;
        int old_ticks, ticks, framecount = 0, last_fps_time = 0;
        int last_framecount = 0;
        double time = 0, last_fps = 0;
index 69fadc0ca9fb4014c63f33ccc0f3cb04a3dc5392..1dbd3f4880db7b81c9df0f5aad18f1ffd3496c73 100644 (file)
--- a/planet.c
+++ b/planet.c
@@ -92,7 +92,7 @@ void draw_planet(SDL_Surface *screen, struct planet *p,
        struct vector pos;
        float radius = p->radius * cam->zoom;
        float r2 = radius * radius;
-       int x, x_start, y, x_end, y_end;
+       int x, x_start, y, x_end;
 
        vector_sub(&p->pos, &cam->pos, &pos);
        vector_scale(&pos, cam->zoom, &pos);