From d1b1cbc75715eb4f40a444d3a1d2741b3617b1f0 Mon Sep 17 00:00:00 2001 From: Hisham Muhammad Date: Tue, 25 Oct 2011 00:05:46 +0000 Subject: cleanups and fixes, thanks to cppcheck and gcc -Wextra --- Meter.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'Meter.c') diff --git a/Meter.c b/Meter.c index 57862364..8c3cc50f 100644 --- a/Meter.c +++ b/Meter.c @@ -5,7 +5,6 @@ Released under the GNU GPL, see the COPYING file in the source distribution for its full text. */ -#define _GNU_SOURCE #include "RichString.h" #include "Meter.h" #include "Object.h" @@ -275,11 +274,10 @@ static void BarMeterMode_draw(Meter* this, int x, int y, int w) { for (int i = 0; i < w; i++) bar[i] = ' '; - const size_t barOffset = w - MIN(strlen(buffer), w); + const size_t barOffset = w - MIN((int)strlen(buffer), w); snprintf(bar + barOffset, w - barOffset + 1, "%s", buffer); // First draw in the bar[] buffer... - double total = 0.0; int offset = 0; for (int i = 0; i < type->items; i++) { double value = this->values[i]; @@ -302,7 +300,6 @@ static void BarMeterMode_draw(Meter* this, int x, int y, int w) { } } offset = nextOffset; - total += this->values[i]; } // ...then print the buffer. -- cgit v1.2.3