From 96e9534289348c890b70329b1fc84c6c6ace26f9 Mon Sep 17 00:00:00 2001 From: PatR Date: Sat, 20 Aug 2022 15:42:04 -0700 Subject: [PATCH] error() doesn't return This will fix some complaints from static analysis. Note that the code it complained about wasn't incorrect and that's likely to be the case of a lot of its complaints. --- include/extern.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/extern.h b/include/extern.h index d60e45f64..277837afb 100644 --- a/include/extern.h +++ b/include/extern.h @@ -2055,7 +2055,7 @@ extern void msmsg(const char *, ...) PRINTF_F(1, 2); extern void gettty(void); extern void settty(const char *); extern void setftty(void); -extern void error(const char *, ...) PRINTF_F(1, 2); +extern void error(const char *, ...) PRINTF_F(1, 2) NORETURN; #if defined(TIMED_DELAY) && defined(_MSC_VER) extern void msleep(unsigned); #endif @@ -2969,7 +2969,7 @@ extern void settty(const char *); extern void setftty(void); extern void intron(void); extern void introff(void); -extern void error (const char *, ...) PRINTF_F(1, 2); +extern void error (const char *, ...) PRINTF_F(1, 2) NORETURN; #ifdef ENHANCED_SYMBOLS extern void tty_utf8graphics_fixup(void); #endif @@ -3136,7 +3136,7 @@ extern void shuttty(const char *); extern void setftty(void); extern void intron(void); extern void introff(void); -extern void error (const char *, ...) PRINTF_F(1, 2); +extern void error (const char *, ...) PRINTF_F(1, 2) NORETURN; #ifdef TIMED_DELAY extern void msleep(unsigned); #endif