From 497ffc2f43521dc5775ebc7989abaaf9863ce67e Mon Sep 17 00:00:00 2001 From: ejurgensen Date: Sat, 4 Mar 2017 18:30:38 +0100 Subject: [PATCH] [misc] Add __attribute__((__noreturn__)) to our abort functions so scan-build doesn't complain about logic errors after abort --- src/misc.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/misc.h b/src/misc.h index 685a3e14..46ad833a 100644 --- a/src/misc.h +++ b/src/misc.h @@ -192,8 +192,13 @@ mutex_init(pthread_mutex_t *mutex); } while(0) /* Used by CHECK_*() macros */ -void log_fatal_err(int domain, const char *func, int line, int err); -void log_fatal_errno(int domain, const char *func, int line); -void log_fatal_null(int domain, const char *func, int line); +void +log_fatal_err(int domain, const char *func, int line, int err) __attribute__((__noreturn__)); + +void +log_fatal_errno(int domain, const char *func, int line) __attribute__((__noreturn__)); + +void +log_fatal_null(int domain, const char *func, int line) __attribute__((__noreturn__)); #endif /* !__MISC_H__ */