From c880f12c31f02bf48bdd76b2a8d7acaccd7ae686 Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Sun, 11 Aug 2013 15:33:11 +0200 Subject: [PATCH] cpusched: Fix compiler warnings MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Fix the following compiler warnings that occur when building with "-W -Wall -Wextra": cpusched.c: In function ‘get_appropriate_cpu’: cpusched.c:28:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] cpusched.c:29:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] Signed-off-by: Tobias Klauser --- cpusched.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cpusched.c b/cpusched.c index cc75be72..2b4260bf 100644 --- a/cpusched.c +++ b/cpusched.c @@ -20,10 +20,10 @@ static unsigned int *cpu_work_map = NULL; static unsigned int cpu_len = 0; static struct rwlock map_lock; -static int get_appropriate_cpu(void) +static unsigned int get_appropriate_cpu(void) { - int i, cpu = 0; - int work = INT_MAX; + unsigned int i, cpu = 0; + unsigned int work = UINT_MAX; for (i = 0; i < cpu_len; ++i) { if (cpu_work_map[i] < work) { -- 2.11.4.GIT