summaryrefslogtreecommitdiff
path: root/include/panic.h
diff options
context:
space:
mode:
authorPatrick Georgi <pgeorgi@google.com>2018-07-04 17:21:09 +0200
committerchrome-bot <chrome-bot@chromium.org>2018-07-12 22:10:02 -0700
commit7e972ab9860d594c0db9d4c2df1742a96f64bc67 (patch)
tree93a1d43a4b9aa749e9fe50f10279cdbdac380053 /include/panic.h
parent97a7b12b3ba7caad4b48eee2ec27773c044b3519 (diff)
downloadchrome-ec-7e972ab9860d594c0db9d4c2df1742a96f64bc67.tar.gz
assert/panic: mark noreturn to inform the compiler
BUG=b:65441143 BRANCH=none TEST=buildall with gcc8.1 stops failing on this family of functions Change-Id: I44f9d643e46f955ea0cd0b5893c2806a4e3f52b0 Signed-off-by: Patrick Georgi <pgeorgi@google.com> Reviewed-on: https://chromium-review.googlesource.com/1126315 Commit-Ready: Patrick Georgi <pgeorgi@chromium.org> Tested-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
Diffstat (limited to 'include/panic.h')
-rw-r--r--include/panic.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/include/panic.h b/include/panic.h
index e5e16dd190..8a689c4b23 100644
--- a/include/panic.h
+++ b/include/panic.h
@@ -118,10 +118,11 @@ void panic_data_print(const struct panic_data *pdata);
* @param linenum Line number where assertion happened
*/
#ifdef CONFIG_DEBUG_ASSERT_BRIEF
-void panic_assert_fail(const char *fname, int linenum);
+void panic_assert_fail(const char *fname, int linenum)
+ __attribute__((noreturn));
#else
void panic_assert_fail(const char *msg, const char *func, const char *fname,
- int linenum);
+ int linenum) __attribute__((noreturn));
#endif
/**
@@ -141,7 +142,7 @@ void panic_reboot(void) __attribute__((noreturn));
* Store a panic log and halt the system for a software-related reason, such as
* stack overflow or assertion failure.
*/
-void software_panic(uint32_t reason, uint32_t info);
+void software_panic(uint32_t reason, uint32_t info) __attribute__((noreturn));
/**
* Log a panic in the panic log, but don't halt the system. Normally