: noreturn cannot be used if function may return
Hi Keir:
I spotted some bogus uses of the noreturn keyword on ia64.
[IA64]: noreturn cannot be used if function may return
The functions die_if_kernel and vmx_die_if_kernel can certainly return. This disqualifies them from using the noreturn keyword which is reserved for functions that never return.
Signed-off-by Herbert Xu <[email protected]>
Cheers,
Signature · 38 lines
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
diff -r 338ceb7b1f09 xen/arch/ia64/linux-xen/unaligned.c
--- a/xen/arch/ia64/linux-xen/unaligned.c Thu Jan 04 10:58:01 2007 +0000
+++ b/xen/arch/ia64/linux-xen/unaligned.c Fri Jan 05 17:03:31 2007 +1100
@@ -24,7 +24,7 @@
#include <asm/uaccess.h>
#include <asm/unaligned.h>
-extern void die_if_kernel(char *str, struct pt_regs *regs, long err) __attribute__ ((noreturn));
+extern void die_if_kernel(char *str, struct pt_regs *regs, long err);
#undef DEBUG_UNALIGNED_TRAP
diff -r 338ceb7b1f09 xen/arch/ia64/xen/xenmisc.c
--- a/xen/arch/ia64/xen/xenmisc.c Thu Jan 04 10:58:01 2007 +0000
+++ b/xen/arch/ia64/xen/xenmisc.c Fri Jan 05 17:03:31 2007 +1100
@@ -77,7 +77,7 @@ void console_print(char *msg)
// called from unaligned.c
////////////////////////////////////
-void die_if_kernel(char *str, struct pt_regs *regs, long err) /* __attribute__ ((noreturn)) */
+void die_if_kernel(char *str, struct pt_regs *regs, long err)
{
if (user_mode(regs))
return;
@@ -88,7 +88,7 @@ void die_if_kernel(char *str, struct pt_
domain_crash_synchronous();
}
-void vmx_die_if_kernel(char *str, struct pt_regs *regs, long err) /* __attribute__ ((noreturn)) */
+void vmx_die_if_kernel(char *str, struct pt_regs *regs, long err)
{
if (vmx_user_mode(regs))
return;