fix a warning

| mckernel/kernel/syscall.c: In function 'sys_madvise':
| mckernel/kernel/syscall.c:2108:
|     warning: 'range' may be used uninitialized in this function
This commit is contained in:
NAKAMURA Gou
2014-12-22 15:26:16 +09:00
parent 5566ed1a63
commit c810afe224

View File

@ -2172,6 +2172,7 @@ SYSCALL_DECLARE(madvise)
ihk_mc_spinlock_lock_noirq(&proc->vm->memory_range_lock);
/* check contiguous map */
first = NULL;
range = NULL; /* for avoidance of warning */
for (addr = start; addr < end; addr = range->end) {
if (first == NULL) {
range = lookup_process_memory_range(proc->vm, start, start+PAGE_SIZE);