1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

r14411: mark smb_panic() as a noreturn function using gcc attributes, which

tells static analysers that it behaves like abort()
This commit is contained in:
Andrew Tridgell 2006-03-15 02:40:08 +00:00 committed by Gerald (Jerry) Carter
parent 59bc3e8ab0
commit 3cde18beae

View File

@ -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 <sys/types.h>
#include <stdio.h>
#include <stdlib.h>