From 71de88d57429d98ce895fcb6fb3aec66e0de89c9 Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Tue, 11 Dec 2007 17:18:22 +0000 Subject: [PATCH] add macro for assert to satisfy the code analysis tools. git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6651 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/include/switch_platform.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/include/switch_platform.h b/src/include/switch_platform.h index 798f562a65..2293a64dc8 100644 --- a/src/include/switch_platform.h +++ b/src/include/switch_platform.h @@ -69,6 +69,10 @@ SWITCH_BEGIN_EXTERN_C #pragma include_alias(, <../../libs/libteletone/src/libteletone_generate.h>) #pragma include_alias(, <../../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 @@ SWITCH_END_EXTERN_C #ifndef TRUE #define TRUE (!FALSE) #endif +#ifndef switch_assert +#define switch_assert(expr) assert(expr) +#endif /* For Emacs: * Local Variables: * mode:c