From 60773bb85916cf4999c767c84702404708c85f7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nils=20ANDR=C3=89-CHANG?= Date: Thu, 23 Jan 2020 07:25:43 +0000 Subject: [PATCH] [IMPROVEMENT] Add noreturn attribute to fatal (#1179) * Set no return * Add MSVC --- src/lib_ccx/lib_ccx.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/lib_ccx/lib_ccx.h b/src/lib_ccx/lib_ccx.h index c9fb535d..afb12216 100644 --- a/src/lib_ccx/lib_ccx.h +++ b/src/lib_ccx/lib_ccx.h @@ -250,6 +250,11 @@ int myth_loop(struct lib_ccx_ctx *ctx); int matroska_loop(struct lib_ccx_ctx *ctx); // utility.c +#if defined(__GNUC__) +__attribute__ ((noreturn)) +#elif defined(_MSC_VER) +__declspec(noreturn) +#endif void fatal(int exit_code, const char *fmt, ...); void mprint (const char *fmt, ...); void sleep_secs (int secs);