From 057e7a85b903e431fa6a7236bb739d04a6e7a9c5 Mon Sep 17 00:00:00 2001 From: Brent Cook Date: Sun, 15 Jan 2017 10:15:51 -0600 Subject: [PATCH] add noreturn attribute to compat functions --- include/compat/err.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/include/compat/err.h b/include/compat/err.h index 65a760f..3a5e01f 100644 --- a/include/compat/err.h +++ b/include/compat/err.h @@ -18,6 +18,11 @@ #include #include +#if defined(_MSC_VER) +__declspec(noreturn) +#else +__attribute__((noreturn)) +#endif static inline void err(int eval, const char *fmt, ...) { @@ -34,6 +39,11 @@ err(int eval, const char *fmt, ...) va_end(ap); } +#if defined(_MSC_VER) +__declspec(noreturn) +#else +__attribute__((noreturn)) +#endif static inline void errx(int eval, const char *fmt, ...) {