From b0e6d1d45438af6a39d4ca8576edce3f6647c46f Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Fri, 17 May 2013 13:25:40 +0200 Subject: die.h: Add __noreturn attribute to exiting functions Add the __noreturn attribute to all functions which wont return but call exit() (or die() respectively) themselves. Signed-off-by: Tobias Klauser --- die.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'die.h') diff --git a/die.h b/die.h index 95d1338..1b8fae5 100644 --- a/die.h +++ b/die.h @@ -23,17 +23,17 @@ static inline void syslog_panic(const char *format, static inline void syslog_maybe(int may, int priority, const char *format, ...) __check_format_printf(3, 4); -static inline void die(void) +static inline void __noreturn die(void) { exit(EXIT_FAILURE); } -static inline void _die(void) +static inline void __noreturn _die(void) { _exit(EXIT_FAILURE); } -static inline void panic(const char *format, ...) +static inline void __noreturn panic(const char *format, ...) { va_list vl; @@ -44,7 +44,7 @@ static inline void panic(const char *format, ...) die(); } -static inline void syslog_panic(const char *format, ...) +static inline void __noreturn syslog_panic(const char *format, ...) { va_list vl; -- cgit v1.2.3-54-g00ecf