sandbox: mark os_abort() as noreturn
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Mon, 1 Feb 2021 00:24:10 +0000 (01:24 +0100)
committerSimon Glass <sjg@chromium.org>
Wed, 3 Feb 2021 10:38:41 +0000 (03:38 -0700)
gcc -fanalyzer needs the information that a function does not return to
provide accurate information.

os_abort() does not return. Mark it accordingly.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
include/os.h

index e192e32..65bcb23 100644 (file)
@@ -341,7 +341,7 @@ void os_localtime(struct rtc_time *rt);
 /**
  * os_abort() - raise SIGABRT to exit sandbox (e.g. to debugger)
  */
-void os_abort(void);
+void os_abort(void) __attribute__((noreturn));
 
 /**
  * os_mprotect_allow() - Remove write-protection on a region of memory