add assert macro to silence msvc code analysis.

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7652 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris 2008-02-17 05:11:21 +00:00
parent e4cefcd14d
commit f1de784d11
3 changed files with 13 additions and 7 deletions

View 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);

View 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 */

View 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
#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 */