aboutsummaryrefslogtreecommitdiff
path: root/stand
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2018-01-26 22:22:21 +0000
committerWarner Losh <imp@FreeBSD.org>2018-01-26 22:22:21 +0000
commit47940d8594c5c565542686812792905791529533 (patch)
treee1c64bfc0ab6445b0a51cc23236cfcb55fc01231 /stand
parent71710c12d6c3f466b38c340002c2d8ca849406e3 (diff)
downloadsrc-47940d8594c5c565542686812792905791529533.tar.gz
src-47940d8594c5c565542686812792905791529533.zip
Tag unreachable places as such. I left the while (1); in place since
in this context we want to busy wait to stop. Suggested by: pfg@
Notes
Notes: svn path=/head/; revision=328449
Diffstat (limited to 'stand')
-rw-r--r--stand/i386/gptboot/gptboot.c1
-rw-r--r--stand/mips/beri/loader/main.c3
-rw-r--r--stand/mips/uboot/conf.c2
-rw-r--r--stand/powerpc/kboot/main.c1
-rw-r--r--stand/uboot/common/main.c3
-rw-r--r--stand/uboot/lib/glue.c3
6 files changed, 11 insertions, 2 deletions
diff --git a/stand/i386/gptboot/gptboot.c b/stand/i386/gptboot/gptboot.c
index 40fa00e59279..a9d54f46196d 100644
--- a/stand/i386/gptboot/gptboot.c
+++ b/stand/i386/gptboot/gptboot.c
@@ -365,6 +365,7 @@ void
exit(int x)
{
while (1);
+ __unreachable();
}
static void
diff --git a/stand/mips/beri/loader/main.c b/stand/mips/beri/loader/main.c
index ac630cf6961b..086b55011ae7 100644
--- a/stand/mips/beri/loader/main.c
+++ b/stand/mips/beri/loader/main.c
@@ -193,6 +193,7 @@ abort(void)
printf("error: loader abort\n");
while (1);
+ __unreachable();
}
void
@@ -201,6 +202,7 @@ exit(int code)
printf("error: loader exit\n");
while (1);
+ __unreachable();
}
void
@@ -209,6 +211,7 @@ longjmperror(void)
printf("error: loader longjmp error\n");
while (1);
+ __unreachable();
}
time_t
diff --git a/stand/mips/uboot/conf.c b/stand/mips/uboot/conf.c
index 3579b6a56753..f711a8cec5f2 100644
--- a/stand/mips/uboot/conf.c
+++ b/stand/mips/uboot/conf.c
@@ -105,6 +105,7 @@ abort(void)
printf("error: loader abort\n");
while (1);
+ __unreachable();
}
void
@@ -113,6 +114,7 @@ longjmperror(void)
printf("error: loader longjmp error\n");
while (1);
+ __unreachable();
}
int debug = 1;
diff --git a/stand/powerpc/kboot/main.c b/stand/powerpc/kboot/main.c
index 2689e6059c91..cbd11611ab66 100644
--- a/stand/powerpc/kboot/main.c
+++ b/stand/powerpc/kboot/main.c
@@ -131,6 +131,7 @@ void
exit(int code)
{
while (1); /* XXX: host_exit */
+ __unreachable();
}
void
diff --git a/stand/uboot/common/main.c b/stand/uboot/common/main.c
index 5540059797cc..a88a8bd0ae46 100644
--- a/stand/uboot/common/main.c
+++ b/stand/uboot/common/main.c
@@ -526,7 +526,8 @@ command_reboot(int argc, char *argv[])
ub_reset();
printf("Reset failed!\n");
- while(1);
+ while (1);
+ __unreachable();
}
COMMAND_SET(devinfo, "devinfo", "show U-Boot devices", command_devinfo);
diff --git a/stand/uboot/lib/glue.c b/stand/uboot/lib/glue.c
index 70a655401c0b..016d435b345e 100644
--- a/stand/uboot/lib/glue.c
+++ b/stand/uboot/lib/glue.c
@@ -187,7 +187,8 @@ ub_reset(void)
{
syscall(API_RESET, NULL);
- while (1); /* Can't tag syscall as __dead2 */
+ while (1); /* fallback if API_RESET failed */
+ __unreachable();
}
static struct mem_region mr[UB_MAX_MR];