[PATCH] x86-64: add default case to emulate_vsyscall() to silence compiler warning

From: Jan Beulich
Date: Thu Sep 15 2011 - 04:38:19 EST


... since the compiler can't possibly know that vsyscall_nr is limited
to three values, and hence 'ret' must appear possibly uninitialized to
it.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
Cc: Andy Lutomirski <luto@xxxxxxx>

---
arch/x86/kernel/vsyscall_64.c | 3 +++
1 file changed, 3 insertions(+)

--- 3.1-rc6/arch/x86/kernel/vsyscall_64.c
+++ 3.1-rc6-x86_64-emul-vsyscall/arch/x86/kernel/vsyscall_64.c
@@ -195,6 +195,9 @@ bool emulate_vsyscall(struct pt_regs *re
(unsigned __user *)regs->si,
0);
break;
+ default:
+ ret = -ENOSYS;
+ break;
}

if (ret == -EFAULT) {



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/