Mark the func pointer as __dead2. It looks up loader_main, which

either aborts or exits, but never returns. Tag it as a non-returning
function rather than supply a bogus return(0) at the end of main.

CID: 1382885
Sponsored by: Netflix
This commit is contained in:
Warner Losh 2017-11-24 05:01:00 +00:00
parent db71174436
commit d927d443e1

View File

@ -422,7 +422,7 @@ int
main(int argc, char** argv)
{
void *h;
void (*func)(struct loader_callbacks *, void *, int, int);
void (*func)(struct loader_callbacks *, void *, int, int) __dead2;
int opt;
char *disk_image = NULL;
const char *userboot_obj = "/boot/userboot.so";