From 3cde18beaed736a48e195550c7e423bccc95c820 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 15 Mar 2006 02:40:08 +0000 Subject: [PATCH] r14411: mark smb_panic() as a noreturn function using gcc attributes, which tells static analysers that it behaves like abort() --- source/include/includes.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/source/include/includes.h b/source/include/includes.h index f7504dcf5d2..f4642cecb90 100644 --- a/source/include/includes.h +++ b/source/include/includes.h @@ -56,6 +56,18 @@ #endif #endif +#ifndef NORETURN_ATTRIBUTE +#if (__GNUC__ >= 3) +#define NORETURN_ATTRIBUTE __attribute__ ((noreturn)) +#else +#define NORETURN_ATTRIBUTE +#endif +#endif + +/* mark smb_panic() as noreturn, so static analysers know that it is + used like abort */ +_PUBLIC_ void smb_panic(const char *why) NORETURN_ATTRIBUTE; + #include #include #include