Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/i386/stand/efiboot Mark reboot() and _rtt() as __dead.
details: https://anonhg.NetBSD.org/src/rev/80546ddd06f7
branches: trunk
changeset: 351164:80546ddd06f7
user: roy <roy%NetBSD.org@localhost>
date: Sat Feb 04 13:36:07 2017 +0000
description:
Mark reboot() and _rtt() as __dead.
Use __builtin_unreachable() to ensure Panic really is marked dead.
Thanks to joerg@
diffstat:
sys/arch/i386/stand/efiboot/Makefile.efiboot | 3 +--
sys/arch/i386/stand/efiboot/panic.c | 7 ++++---
2 files changed, 5 insertions(+), 5 deletions(-)
diffs (47 lines):
diff -r 2afa0766ffe3 -r 80546ddd06f7 sys/arch/i386/stand/efiboot/Makefile.efiboot
--- a/sys/arch/i386/stand/efiboot/Makefile.efiboot Sat Feb 04 10:56:10 2017 +0000
+++ b/sys/arch/i386/stand/efiboot/Makefile.efiboot Sat Feb 04 13:36:07 2017 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.efiboot,v 1.2 2017/02/03 17:24:43 roy Exp $
+# $NetBSD: Makefile.efiboot,v 1.3 2017/02/04 13:36:07 roy Exp $
S= ${.CURDIR}/../../../../..
@@ -46,7 +46,6 @@
CPPFLAGS+= -I${.OBJDIR}
CPPFLAGS+= -I${.CURDIR}/../../lib
-CWARNFLAGS.clang+= -Wno-invalid-noreturn #panic.c
COPTS+= -ffreestanding -fPIC -fshort-wchar -fno-strict-aliasing -fno-builtin
COPTS+= -fno-stack-protector
COPTS+= ${${ACTIVE_CC} == "gcc":? -falign-functions=16 :}
diff -r 2afa0766ffe3 -r 80546ddd06f7 sys/arch/i386/stand/efiboot/panic.c
--- a/sys/arch/i386/stand/efiboot/panic.c Sat Feb 04 10:56:10 2017 +0000
+++ b/sys/arch/i386/stand/efiboot/panic.c Sat Feb 04 13:36:07 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: panic.c,v 1.1 2017/01/24 11:09:14 nonaka Exp $ */
+/* $NetBSD: panic.c,v 1.2 2017/02/04 13:36:07 roy Exp $ */
/*-
* Copyright (c) 2016 Kimihiro Nonaka <nonaka%netbsd.org@localhost>
@@ -47,9 +47,10 @@
va_end(args);
reboot();
/*NOTREACHED*/
+ __builtin_unreachable();
}
-void
+__dead void
reboot(void)
{
@@ -61,7 +62,7 @@
continue;
}
-void
+__dead void
_rtt(void)
{
Home |
Main Index |
Thread Index |
Old Index