Author: imp
Date: Fri Jan 26 21:50:59 2018
New Revision: 328446
URL: https://svnweb.freebsd.org/changeset/base/328446

Log:
  Now that exit is __dead2, we need to tag ub_exit() as __dead2. To do
  that, we have to put a while (1); after the syscall that will never
  return to fake out the compiler....

Modified:
  head/stand/uboot/lib/glue.c
  head/stand/uboot/lib/glue.h

Modified: head/stand/uboot/lib/glue.c
==============================================================================
--- head/stand/uboot/lib/glue.c Fri Jan 26 18:42:28 2018        (r328445)
+++ head/stand/uboot/lib/glue.c Fri Jan 26 21:50:59 2018        (r328446)
@@ -187,6 +187,7 @@ ub_reset(void)
 {
 
        syscall(API_RESET, NULL);
+       while (1);              /* Can't tag syscall as __dead2 */
 }
 
 static struct mem_region mr[UB_MAX_MR];

Modified: head/stand/uboot/lib/glue.h
==============================================================================
--- head/stand/uboot/lib/glue.h Fri Jan 26 18:42:28 2018        (r328445)
+++ head/stand/uboot/lib/glue.h Fri Jan 26 21:50:59 2018        (r328446)
@@ -78,7 +78,7 @@ void ub_putc(char);
 void ub_puts(const char *);
 
 /* system */
-void ub_reset(void);
+void ub_reset(void) __dead2;
 struct sys_info *ub_get_sys_info(void);
 
 /* time */
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to