diff mbox series

[1/1] sandbox: mark os_abort() as __noreturn

Message ID 20210131235508.27185-1-xypron.glpk@gmx.de
State Rejected, archived
Delegated to: Simon Glass
Headers show
Series [1/1] sandbox: mark os_abort() as __noreturn | expand

Commit Message

Heinrich Schuchardt Jan. 31, 2021, 11:55 p.m. UTC
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>
---
 include/os.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--
2.29.2
diff mbox series

Patch

diff --git a/include/os.h b/include/os.h
index e192e32d59..8de802cab0 100644
--- a/include/os.h
+++ b/include/os.h
@@ -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 __noreturn os_abort(void);

 /**
  * os_mprotect_allow() - Remove write-protection on a region of memory