summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2013-05-17 13:25:40 +0200
committerTobias Klauser <tklauser@distanz.ch>2013-05-17 13:30:04 +0200
commitb0e6d1d45438af6a39d4ca8576edce3f6647c46f (patch)
treedf906142f80e5f20f11825b76869f5740018a8f6
parent82799b033807977478d7848d55264f6f3132a5eb (diff)
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 <tklauser@distanz.ch>
-rw-r--r--die.h8
1 files changed, 4 insertions, 4 deletions
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;