linux-mips
[Top] [All Lists]

[PATCH] die(): Properly declare as non-returning

To: Ralf Baechle <ralf@linux-mips.org>
Subject: [PATCH] die(): Properly declare as non-returning
From: "Maciej W. Rozycki" <macro@linux-mips.org>
Date: Tue, 29 May 2007 15:03:56 +0100 (BST)
Cc: linux-mips@linux-mips.org
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
 This marks the declaration of die() correctly, removing "control reaches 
end of non-void function" warnings from non-void functions that die() at 
the end.

Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
---

 I've noticed there is an ongoing discussion about the use of NORET_TYPE 
and ATTRIB_NORET, but until that is resolved this change is useful.

 Please apply.

  Maciej

patch-mips-2.6.21-20070502-die-noret-0
diff -up --recursive --new-file 
linux-mips-2.6.21-20070502.macro/include/asm-mips/ptrace.h 
linux-mips-2.6.21-20070502/include/asm-mips/ptrace.h
--- linux-mips-2.6.21-20070502.macro/include/asm-mips/ptrace.h  2007-02-21 
05:57:58.000000000 +0000
+++ linux-mips-2.6.21-20070502/include/asm-mips/ptrace.h        2007-05-27 
21:15:00.000000000 +0000
@@ -86,7 +86,7 @@ struct pt_regs {
 
 extern asmlinkage void do_syscall_trace(struct pt_regs *regs, int entryexit);
 
-extern NORET_TYPE void die(const char *, struct pt_regs *);
+extern NORET_TYPE void die(const char *, struct pt_regs *) ATTRIB_NORET;
 
 static inline void die_if_kernel(const char *str, struct pt_regs *regs)
 {

<Prev in Thread] Current Thread [Next in Thread>