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@
This commit is contained in:
Warner Losh 2018-01-26 22:22:21 +00:00
parent 71710c12d6
commit 47940d8594
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=328449
6 changed files with 11 additions and 2 deletions

View File

@ -365,6 +365,7 @@ void
exit(int x)
{
while (1);
__unreachable();
}
static void

View File

@ -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

View File

@ -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;

View File

@ -131,6 +131,7 @@ void
exit(int code)
{
while (1); /* XXX: host_exit */
__unreachable();
}
void

View File

@ -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);

View File

@ -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];