]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
add assert macro to silence msvc code analysis.
authorMichael Jerris <mike@jerris.com>
Sun, 17 Feb 2008 05:11:21 +0000 (05:11 +0000)
committerMichael Jerris <mike@jerris.com>
Sun, 17 Feb 2008 05:11:21 +0000 (05:11 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7652 d0543943-73ff-0310-b7d9-9358b9ac24b2

libs/voipcodecs/src/gsm0610_long_term.c
libs/voipcodecs/src/gsm0610_rpe.c
libs/voipcodecs/src/voipcodecs/telephony.h

index ade57f6b568933b2ddef183bcd35dbd45870c358..17c081568025fc2730b8d12c58312b124a025f0b 100644 (file)
@@ -355,12 +355,12 @@ void gsm0610_long_term_predictor(gsm0610_state_t *s,
                                  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);
index f0f09ca06f56753b74a59ad3bb778214e019bbac..dc6bc9ec2261d728a908e14504c236a38bfbfdf4 100644 (file)
@@ -433,7 +433,7 @@ static void apcm_inverse_quantization(int16_t xMc[13],
        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 */
index b33786ef0980bc913df39d1ce7f3c041676d1011..cad291008a652a2a23d10fc920aa6496a86cca47 100644 (file)
@@ -54,6 +54,12 @@ typedef int (span_tx_handler_t)(void *s, int16_t amp[], int max_len);
 #if !defined(TRUE)
 #define TRUE (!FALSE)
 #endif
+\r
+#if (_MSC_VER >= 1400)                 // VC8+\r
+#define vc_assert(expr) assert(expr);__analysis_assume( expr )\r
+#else\r
+#define vc_assert(expr) assert(expr)\r
+#endif\r
 
 #if defined(__cplusplus)
 /* C++ doesn't seem to have sane rounding functions/macros yet */