[Freeswitch-trunk] [commit] r6651 - freeswitch/trunk/src/include

Freeswitch SVN mikej at freeswitch.org
Tue Dec 11 12:18:23 EST 2007


Author: mikej
Date: Tue Dec 11 12:18:22 2007
New Revision: 6651

Modified:
   freeswitch/trunk/src/include/switch_platform.h

Log:
add macro for assert to satisfy the code analysis tools.

Modified: freeswitch/trunk/src/include/switch_platform.h
==============================================================================
--- freeswitch/trunk/src/include/switch_platform.h	(original)
+++ freeswitch/trunk/src/include/switch_platform.h	Tue Dec 11 12:18:22 2007
@@ -69,6 +69,10 @@
 #pragma include_alias(<libteletone_generate.h>,		<../../libs/libteletone/src/libteletone_generate.h>)
 #pragma include_alias(<libteletone_detect.h>,		<../../libs/libteletone/src/libteletone_detect.h>)
 
+#if (_MSC_VER >= 1500)			// VC8+
+#define switch_assert(expr) assert(expr);__analysis_assume( expr )
+#endif
+
 #if (_MSC_VER >= 1400)			// VC8+
 #ifndef _CRT_SECURE_NO_DEPRECATE
 #define _CRT_SECURE_NO_DEPRECATE
@@ -285,6 +289,9 @@
 #ifndef TRUE
 #define TRUE (!FALSE)
 #endif
+#ifndef switch_assert
+#define switch_assert(expr) assert(expr)
+#endif
 /* For Emacs:
  * Local Variables:
  * mode:c



More information about the Freeswitch-trunk mailing list