summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2006-03-15 02:40:08 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:57:20 -0500
commit055861925433147a9b0f07f399c4ab345f9bef65 (patch)
tree3f8fc1a9fcdbd38688f5618639d63e186bae84af /source4
parent819110dfb37aca76a887839bf3da89dc143a48ec (diff)
downloadsamba-055861925433147a9b0f07f399c4ab345f9bef65.tar.gz
samba-055861925433147a9b0f07f399c4ab345f9bef65.tar.bz2
samba-055861925433147a9b0f07f399c4ab345f9bef65.zip
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)
Diffstat (limited to 'source4')
-rw-r--r--source4/include/includes.h12
1 files changed, 12 insertions, 0 deletions
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 <sys/types.h>
#include <stdio.h>
#include <stdlib.h>