diff options
author | loderunner <loderunner@63cc0a6c-1f0e-0410-841e-f6a342073da8> | 2011-10-25 00:05:46 +0000 |
---|---|---|
committer | loderunner <loderunner@63cc0a6c-1f0e-0410-841e-f6a342073da8> | 2011-10-25 00:05:46 +0000 |
commit | c760e9a48e9c32fcd7b5e8ebf26b10443f9d9660 (patch) | |
tree | d7ba15bd1300fff66757d0178ed91b156312bf7c /Meter.c | |
parent | 770061a1977065df758fa475c4a76ad1e993857c (diff) | |
download | htop-c760e9a48e9c32fcd7b5e8ebf26b10443f9d9660.tar.gz |
cleanups and fixes, thanks to cppcheck and gcc -Wextra
git-svn-id: svn://svn.code.sf.net/p/htop/code/trunk@256 63cc0a6c-1f0e-0410-841e-f6a342073da8
Diffstat (limited to 'Meter.c')
-rw-r--r-- | Meter.c | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -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. |