svn commit: samba r14411 - in branches/SAMBA_4_0/source/include: .

tridge at samba.org tridge at samba.org
Wed Mar 15 02:40:09 GMT 2006


Author: tridge
Date: 2006-03-15 02:40:08 +0000 (Wed, 15 Mar 2006)
New Revision: 14411

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=14411

Log:

mark smb_panic() as a noreturn function using gcc attributes, which
tells static analysers that it behaves like abort()

Modified:
   branches/SAMBA_4_0/source/include/includes.h


Changeset:
Modified: branches/SAMBA_4_0/source/include/includes.h
===================================================================
--- branches/SAMBA_4_0/source/include/includes.h	2006-03-15 02:39:22 UTC (rev 14410)
+++ branches/SAMBA_4_0/source/include/includes.h	2006-03-15 02:40:08 UTC (rev 14411)
@@ -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>



More information about the samba-cvs mailing list