From 2752ac351b9bf5c564e090602c9f48826c682a4e Mon Sep 17 00:00:00 2001 From: Duilio Protti Date: Fri, 1 Jul 2016 17:16:35 -0300 Subject: [PATCH] Removed redundant code after cppcheck --- src/compute.c | 3 +-- src/display.c | 4 ++-- src/infinity.c | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/compute.c b/src/compute.c index 59a48ec..a58455e 100644 --- a/src/compute.c +++ b/src/compute.c @@ -117,7 +117,7 @@ static inline t_complex fct(t_complex a, guint32 n, gint32 p1, gint32 p2) /* p an = 0.002; co = cos(an); si = sin(an); - circle_size = height * 0.25; + //circle_size = height * 0.25; fact = 1 + cos(atan(a.x / (a.y + 0.00001)) * 6) * 0.02; b.x = (co * a.x - si * a.y); b.y = (si * a.x + co * a.y); @@ -221,7 +221,6 @@ void compute_vector_field_destroy(vector_field_t *vector_field) g_free(vector_field->vector); g_free(vector_field); - vector_field = NULL; } void compute_quit() diff --git a/src/display.c b/src/display.c index d6d10c0..8e6fe99 100644 --- a/src/display.c +++ b/src/display.c @@ -192,7 +192,7 @@ static void line(gint32 x1, gint32 y1, gint32 x2, gint32 y2, gint32 c) dxy = -1; else dxy = 1; - for (y1 = y1; y1 < y2; y1++) { + for (; y1 < y2; y1++) { cxy += dx; if (cxy >= dy) { x1 += dxy; @@ -211,7 +211,7 @@ static void line(gint32 x1, gint32 y1, gint32 x2, gint32 y2, gint32 c) else dxy = 1; - for (x1 = x1; x1 < x2; x1++) { + for (; x1 < x2; x1++) { cxy += dy; if (cxy >= dx) { y1 += dxy; diff --git a/src/infinity.c b/src/infinity.c index b1e8fef..f1e14d4 100644 --- a/src/infinity.c +++ b/src/infinity.c @@ -234,7 +234,7 @@ static void handle_window_event(SDL_Event *event) { SDL_Log("Window %d restored", event->window.windowID); break;*/ case SDL_WINDOWEVENT_CLOSE: - SDL_Log("Window %d closed", event->window.windowID); + //SDL_Log("Window %d closed", event->window.windowID); player->disable_plugin(); break; default: