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:
parent
59bc3e8ab0
commit
3cde18beae
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user