svn commit: r326144 - head/stand/userboot/test
Warner Losh
imp at FreeBSD.org
Fri Nov 24 05:01:01 UTC 2017
Author: imp
Date: Fri Nov 24 05:01:00 2017
New Revision: 326144
URL: https://svnweb.freebsd.org/changeset/base/326144
Log:
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
Modified:
head/stand/userboot/test/test.c
Modified: head/stand/userboot/test/test.c
==============================================================================
--- head/stand/userboot/test/test.c Fri Nov 24 05:00:25 2017 (r326143)
+++ head/stand/userboot/test/test.c Fri Nov 24 05:01:00 2017 (r326144)
@@ -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";
More information about the svn-src-all
mailing list