[Freeswitch-svn] [commit] r7652 - in freeswitch/trunk/libs/voipcodecs/src: . voipcodecs
Freeswitch SVN
mikej at freeswitch.org
Sun Feb 17 00:11:21 EST 2008
Author: mikej
Date: Sun Feb 17 00:11:21 2008
New Revision: 7652
Modified:
freeswitch/trunk/libs/voipcodecs/src/gsm0610_long_term.c
freeswitch/trunk/libs/voipcodecs/src/gsm0610_rpe.c
freeswitch/trunk/libs/voipcodecs/src/voipcodecs/telephony.h
Log:
add assert macro to silence msvc code analysis.
Modified: freeswitch/trunk/libs/voipcodecs/src/gsm0610_long_term.c
==============================================================================
--- freeswitch/trunk/libs/voipcodecs/src/gsm0610_long_term.c (original)
+++ freeswitch/trunk/libs/voipcodecs/src/gsm0610_long_term.c Sun Feb 17 00:11:21 2008
@@ -355,12 +355,12 @@
int16_t *Nc,
int16_t *bc)
{
- assert(d);
- assert(dp);
- assert(e);
- assert(dpp);
- assert(Nc);
- assert(bc);
+ vc_assert(d);
+ vc_assert(dp);
+ vc_assert(e);
+ vc_assert(dpp);
+ vc_assert(Nc);
+ vc_assert(bc);
*bc = evaluate_ltp_parameters(d, dp, Nc);
long_term_analysis_filtering(*bc, *Nc, dp, d, dpp, e);
Modified: freeswitch/trunk/libs/voipcodecs/src/gsm0610_rpe.c
==============================================================================
--- freeswitch/trunk/libs/voipcodecs/src/gsm0610_rpe.c (original)
+++ freeswitch/trunk/libs/voipcodecs/src/gsm0610_rpe.c Sun Feb 17 00:11:21 2008
@@ -433,7 +433,7 @@
samples to obtain the xMp[0..12] array. Table 4.6 is used to get
the mantissa of xmaxc (FAC[0..7]).
*/
- assert(mant >= 0 && mant <= 7);
+ vc_assert(mant >= 0 && mant <= 7);
temp1 = gsm_FAC[mant]; /* See 4.2-15 for mant */
temp2 = gsm_sub(6, exp); /* See 4.2-15 for exp */
Modified: freeswitch/trunk/libs/voipcodecs/src/voipcodecs/telephony.h
==============================================================================
--- freeswitch/trunk/libs/voipcodecs/src/voipcodecs/telephony.h (original)
+++ freeswitch/trunk/libs/voipcodecs/src/voipcodecs/telephony.h Sun Feb 17 00:11:21 2008
@@ -54,6 +54,12 @@
#if !defined(TRUE)
#define TRUE (!FALSE)
#endif
+
+#if (_MSC_VER >= 1400) // VC8+
+#define vc_assert(expr) assert(expr);__analysis_assume( expr )
+#else
+#define vc_assert(expr) assert(expr)
+#endif
#if defined(__cplusplus)
/* C++ doesn't seem to have sane rounding functions/macros yet */
More information about the Freeswitch-svn
mailing list