summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2013-08-11 15:33:11 +0200
committerTobias Klauser <tklauser@distanz.ch>2013-08-11 15:33:11 +0200
commitc880f12c31f02bf48bdd76b2a8d7acaccd7ae686 (patch)
tree28e76c4e2d9d95f5099f9b294e15d685bd21a2e1
parentfca52c23758ad65a7245c7f9043fa67eb01b93e7 (diff)
cpusched: Fix compiler warnings
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 <tklauser@distanz.ch>
-rw-r--r--cpusched.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/cpusched.c b/cpusched.c
index cc75be7..2b4260b 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) {