From 055861925433147a9b0f07f399c4ab345f9bef65 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 15 Mar 2006 02:40:08 +0000 Subject: r14411: mark smb_panic() as a noreturn function using gcc attributes, which tells static analysers that it behaves like abort() (This used to be commit 3cde18beaed736a48e195550c7e423bccc95c820) --- source4/include/includes.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'source4/include') diff --git a/source4/include/includes.h b/source4/include/includes.h index f7504dcf5d..f4642cecb9 100644 --- a/source4/include/includes.h +++ b/source4/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 -- cgit