From bc568d0b9f216f8d3c26b888131f4a9a7e9d368d Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Fri, 29 Jun 2018 20:23:29 +0200 Subject: osmo_panic(): Annotate as __attribute__ ((noreturn)) In Change-Id I5a70eb65952cbc329bf96eacb428b07a9da32433 we redirected all OSMO_ASSERT() via osmo_panic(). However, this caused various applications to have build failures, as OSMO_ASSERT() now appeared to be able to return to the call site. Let's inform the compiler explicitly that there's no return from osmo_panic(). Change-Id: I8adf4c7b0ee6a4581cef8dd4e9f6a1dfde70ee55 --- include/osmocom/core/panic.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/osmocom/core/panic.h b/include/osmocom/core/panic.h index 2bb4240b..c4006dc3 100644 --- a/include/osmocom/core/panic.h +++ b/include/osmocom/core/panic.h @@ -9,7 +9,7 @@ /*! panic handler callback function type */ typedef void (*osmo_panic_handler_t)(const char *fmt, va_list args); -extern void osmo_panic(const char *fmt, ...); +extern void osmo_panic(const char *fmt, ...) __attribute__ ((noreturn)); extern void osmo_set_panic_handler(osmo_panic_handler_t h); /*! @} */ -- cgit v1.2.3