git.samba.org
/
sfrench
/
samba-autobuild
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
819110d
)
r14411: mark smb_panic() as a noreturn function using gcc attributes, which
author
Andrew Tridgell
<tridge@samba.org>
Wed, 15 Mar 2006 02:40:08 +0000
(
02:40
+0000)
committer
Gerald (Jerry) Carter
<jerry@samba.org>
Wed, 10 Oct 2007 18:57:20 +0000
(13:57 -0500)
tells static analysers that it behaves like abort()
(This used to be commit
3cde18beaed736a48e195550c7e423bccc95c820
)
source4/include/includes.h
patch
|
blob
|
history
diff --git
a/source4/include/includes.h
b/source4/include/includes.h
index f7504dcf5d207a76955bdf180b3bfe7fb34b1bf1..f4642cecb90df838bf76b6c72a33518896b123a3 100644
(file)
--- 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 <sys/types.h>
#include <stdio.h>
#include <stdlib.h>