From 779f03de7f9df67b37676ef1293dc895120bbd77 Mon Sep 17 00:00:00 2001 From: Christian Neukirchen Date: Tue, 30 Aug 2016 21:34:54 +0200 Subject: parse_error: portably declare noreturn Squelches many clang-analyzer false positives. --- lr.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'lr.c') diff --git a/lr.c b/lr.c index 777b137..6baab9a 100644 --- a/lr.c +++ b/lr.c @@ -57,6 +57,16 @@ #include #include +#ifdef __has_include + #if __has_include() + #include + #else + #define noreturn /**/ + #endif +#else + #define noreturn /**/ +#endif + /* For Solaris. */ #if !defined(FNM_CASEFOLD) && defined(FNM_IGNORECASE) #define FNM_CASEFOLD FNM_IGNORECASE @@ -203,7 +213,7 @@ struct expr { static char *pos; -static void +noreturn static void parse_error(const char *msg, ...) { va_list ap; -- cgit 1.4.1