From 6050ee100f593585850bf1ead5b02cc1f565b155 Mon Sep 17 00:00:00 2001 From: Benny Prijono Date: Wed, 6 May 2009 14:34:13 +0000 Subject: More ticket #774: fixed G.722.1 compilation warnings on linux/gcc-4.3.2 git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@2675 74dad513-b988-da41-8d7b-12977e46ad98 --- pjmedia/src/test/codec_vectors.c | 10 +++++++--- pjmedia/src/test/mips_test.c | 4 ++++ pjmedia/src/test/sdp_neg_test.c | 4 +++- third_party/g7221/common/common.c | 2 +- third_party/g7221/decode/decoder.c | 4 ++-- 5 files changed, 17 insertions(+), 7 deletions(-) diff --git a/pjmedia/src/test/codec_vectors.c b/pjmedia/src/test/codec_vectors.c index 787752a2..f68913d3 100644 --- a/pjmedia/src/test/codec_vectors.c +++ b/pjmedia/src/test/codec_vectors.c @@ -125,11 +125,14 @@ static int codec_test_encode(pjmedia_codec_mgr *mgr, } if (out_frame.size) { - fwrite(out_frame.buf, out_frame.size, 1, output); + int cnt; + + cnt = fwrite(out_frame.buf, out_frame.size, 1, output); if (encoded_frame_len == 0) encoded_frame_len = out_frame.size; - } } + } + } fclose(output); output = NULL; @@ -490,7 +493,7 @@ on_return: return rc; } - +#if PJMEDIA_HAS_G7221_CODEC /* For ITU testing, off the 2 lsbs. */ static void g7221_pcm_manip(short *pcm, unsigned count) { @@ -499,6 +502,7 @@ static void g7221_pcm_manip(short *pcm, unsigned count) pcm[i] &= 0xfffc; } +#endif /* PJMEDIA_HAS_G7221_CODEC */ int codec_test_vectors(void) { diff --git a/pjmedia/src/test/mips_test.c b/pjmedia/src/test/mips_test.c index 148789e4..dfde5fb4 100644 --- a/pjmedia/src/test/mips_test.c +++ b/pjmedia/src/test/mips_test.c @@ -882,6 +882,7 @@ static pjmedia_port* g722_encode_decode(pj_pool_t *pool, samples_per_frame, flags, te); } +#if PJMEDIA_HAS_G7221_CODEC /* G.722.1 benchmark benchmark */ static pjmedia_port* g7221_encode_decode(pj_pool_t *pool, unsigned clock_rate, @@ -911,6 +912,7 @@ static pjmedia_port* g7221c_encode_decode(pj_pool_t *pool, clock_rate, channel_count, samples_per_frame, flags, te); } +#endif /* PJMEDIA_HAS_G7221_CODEC */ #if defined(PJMEDIA_HAS_L16_CODEC) && PJMEDIA_HAS_L16_CODEC!=0 static pj_status_t init_l16_default(pjmedia_endpt *endpt) @@ -1939,6 +1941,7 @@ static pjmedia_port* create_stream_g722( pj_pool_t *pool, } /* G722.1 stream */ +#if PJMEDIA_HAS_G7221_CODEC static pjmedia_port* create_stream_g7221( pj_pool_t *pool, unsigned clock_rate, unsigned channel_count, @@ -1967,6 +1970,7 @@ static pjmedia_port* create_stream_g7221c( pj_pool_t *pool, clock_rate, channel_count, samples_per_frame, flags, te); } +#endif /* PJMEDIA_HAS_G7221_CODEC */ /***************************************************************************/ /* Delay buffer */ diff --git a/pjmedia/src/test/sdp_neg_test.c b/pjmedia/src/test/sdp_neg_test.c index 53cc35d7..b5f3edb6 100644 --- a/pjmedia/src/test/sdp_neg_test.c +++ b/pjmedia/src/test/sdp_neg_test.c @@ -1460,12 +1460,14 @@ static int offer_answer_test(pj_pool_t *pool, pjmedia_sdp_neg **p_neg, return -210; } } else if (neg) { - status = pjmedia_sdp_neg_get_active_local(neg, &sdp2); + const pjmedia_sdp_session *lsdp; + status = pjmedia_sdp_neg_get_active_local(neg, &lsdp); if (status != PJ_SUCCESS) { app_perror(status, " error: pjmedia_sdp_neg_get_active_local"); return -215; } + sdp2 = (pjmedia_sdp_session*)lsdp; } if (neg == NULL) { diff --git a/third_party/g7221/common/common.c b/third_party/g7221/common/common.c index 94bcf79c..d5eed810 100644 --- a/third_party/g7221/common/common.c +++ b/third_party/g7221/common/common.c @@ -169,7 +169,7 @@ void comp_powercat_and_catbalance(Word16 *power_categories, Word16 min_rate_categories[MAX_NUMBER_OF_REGIONS]; Word16 temp_category_balances[2*MAX_NUM_CATEGORIZATION_CONTROL_POSSIBILITIES]; Word16 raw_max, raw_min; - Word16 raw_max_index, raw_min_index; + Word16 raw_max_index=0, raw_min_index=0; Word16 max_rate_pointer, min_rate_pointer; Word16 max, min; Word16 itemp0; diff --git a/third_party/g7221/decode/decoder.c b/third_party/g7221/decode/decoder.c index 43aabc54..ab81a300 100644 --- a/third_party/g7221/decode/decoder.c +++ b/third_party/g7221/decode/decoder.c @@ -472,8 +472,8 @@ void decode_vector_quantized_mlt_indices(Bit_Obj *bitobj, Word16 vec_dim; Word16 num_vecs; Word16 index; - Word16 bit; - Word16 signs_index; + Word16 bit=0; + Word16 signs_index=0; Word16 num_sign_bits; Word16 ran_out_of_bits_flag; Word16 *decoder_table_ptr; -- cgit v1.2.3