From 6d78ab1940bdb2aef544ff9dc914ebde40ef6c85 Mon Sep 17 00:00:00 2001 From: nirenjan Date: Mon, 25 Oct 2021 12:56:41 -0700 Subject: [PATCH] Add noreturn attribute to tap_bailout This change is necessary since clang warns on a missing noreturn attribute. --- lib/pinelog/test_pinelog.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/pinelog/test_pinelog.c b/lib/pinelog/test_pinelog.c index 2673478..def0234 100644 --- a/lib/pinelog/test_pinelog.c +++ b/lib/pinelog/test_pinelog.c @@ -168,6 +168,11 @@ static void verify_defaults(void) TEST_LOG(FATAL, filter, fmt, ##__VA_ARGS__); \ } while (0) +#if defined __has_attribute +# if __has_attribute(noreturn) + __attribute__((noreturn)) +# endif +#endif static void tap_bailout(const char *msg) { printf("Bail out! Error %d %s:%s\n", errno, msg, strerror(errno));