diff options
author | Tobias Klauser <tklauser@distanz.ch> | 2013-08-11 15:33:11 +0200 |
---|---|---|
committer | Tobias Klauser <tklauser@distanz.ch> | 2013-08-11 15:33:11 +0200 |
commit | c880f12c31f02bf48bdd76b2a8d7acaccd7ae686 (patch) | |
tree | 28e76c4e2d9d95f5099f9b294e15d685bd21a2e1 | |
parent | fca52c23758ad65a7245c7f9043fa67eb01b93e7 (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.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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) { |