Messages in this thread Patch in this message | | | Date | Wed, 24 Nov 2004 01:52:41 +0100 (CET) | From | Jesper Juhl <> | Subject | [PATCH] remove errornous semicolon in arch/i386/kernel/traps.c::do_general_protection |
| |
Building with gcc -W revealed this warning: arch/i386/kernel/traps.c: In function `do_general_protection': arch/i386/kernel/traps.c:506: warning: empty body in an if-statement
upon inspecting the code I see what looks like a mistakenly placed ";"
if (!fixup_exception(regs)) { if (notify_die(DIE_GPF, "general protection fault", regs, error_code, 13, SIGSEGV) == NOTIFY_STOP); return; die("general protection fault", regs, error_code); }
Shouldn't that ";" after the second if go away so the return; before die() is not unconditional?
The following patch would seem to make sense to me, but if I'm misunderstanding something feel free to let me know :)
Signed-off-by: Jesper Juhl <juhl-lkml@dif.dk>
diff -up linux-2.6.10-rc2-bk8-orig/arch/i386/kernel/traps.c linux-2.6.10-rc2-bk8/arch/i386/kernel/traps.c --- linux-2.6.10-rc2-bk8-orig/arch/i386/kernel/traps.c 2004-11-24 01:24:41.000000000 +0100 +++ linux-2.6.10-rc2-bk8/arch/i386/kernel/traps.c 2004-11-24 01:47:27.000000000 +0100 @@ -504,7 +504,7 @@ gp_in_vm86: gp_in_kernel: if (!fixup_exception(regs)) { if (notify_die(DIE_GPF, "general protection fault", regs, - error_code, 13, SIGSEGV) == NOTIFY_STOP); + error_code, 13, SIGSEGV) == NOTIFY_STOP) return; die("general protection fault", regs, error_code); }
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |