From bc1a4990f32c00d53a76aa0742358e094b564a8a Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Sat, 13 Jul 2013 16:02:30 +0200 Subject: ifpps: Use unsigned int to store number of CPUs Since get_number_cpus() now returns unsigned int store it's return value and derived values in unsigned int variables as well. This fixes the some warnings when compiling with -W/-Wsign-compare: Signed-off-by: Tobias Klauser --- ifpps.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ifpps.c b/ifpps.c index 6742dd7..69e0f24 100644 --- a/ifpps.c +++ b/ifpps.c @@ -1036,7 +1036,8 @@ static void screen_update(WINDOW *screen, const char *ifname, const struct ifsta int *first, uint64_t ms_interval, unsigned int top_cpus, bool need_info) { - int cpus, top, voff = 1, cvoff = 2; + unsigned int cpus, top; + int voff = 1, cvoff = 2; u32 rate = device_bitrate(ifname); curs_set(0); @@ -1291,8 +1292,8 @@ static int term_main(const char *ifname, uint64_t ms_interval, int main(int argc, char **argv) { short ifflags = 0; - int c, opt_index, ret, cpus, promisc = 0; - unsigned int top_cpus = 5; + int c, opt_index, ret, promisc = 0; + unsigned int cpus, top_cpus = 5; uint64_t interval = 1000; char *ifname = NULL; bool suppress_warnings = false; -- cgit v1.2.3-54-g00ecf