From 7a5aa1186af46e7a29a1792521449d64c5b004e5 Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Wed, 28 Dec 2005 20:10:51 +0000 Subject: [PATCH] fix some warnings. git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@228 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/mod/mod_bridgecall/mod_bridgecall.vcproj | 2 +- src/mod/mod_sndfile/mod_sndfile.c | 32 ++++++++++---------- src/mod/mod_speexcodec/mod_speexcodec.c | 6 ++-- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/mod/mod_bridgecall/mod_bridgecall.vcproj b/src/mod/mod_bridgecall/mod_bridgecall.vcproj index 86366d09e7..0cc43ce377 100644 --- a/src/mod/mod_bridgecall/mod_bridgecall.vcproj +++ b/src/mod/mod_bridgecall/mod_bridgecall.vcproj @@ -68,7 +68,7 @@ GenerateDebugInformation="true" ProgramDatabaseFile="$(OutDir)/mod_bridgecall.pdb" SubSystem="2" - ImportLibrary="$(OutDir)/mod_bridgecall.lib" + ImportLibrary="" TargetMachine="1" /> sfinfo.samplerate); - handle->samples = context->sfinfo.frames; + handle->samples = (unsigned int)context->sfinfo.frames; handle->samplerate = context->sfinfo.samplerate; handle->channels = context->sfinfo.channels; handle->format = context->sfinfo.format; @@ -137,7 +137,7 @@ switch_status sndfile_file_seek(switch_file_handle *handle, unsigned int *cur_sa return SWITCH_STATUS_NOTIMPL; } - *cur_sample = sf_seek(context->handle, samples, whence); + *cur_sample = (unsigned int)sf_seek(context->handle, samples, whence); return SWITCH_STATUS_SUCCESS; @@ -145,21 +145,21 @@ switch_status sndfile_file_seek(switch_file_handle *handle, unsigned int *cur_sa switch_status sndfile_file_read (switch_file_handle *handle, void *data, size_t *len) { - unsigned int inlen = *len; + size_t inlen = *len; sndfile_context *context = handle->private; if (switch_test_flag(handle, SWITCH_FILE_DATA_RAW)) { - *len = sf_read_raw (context->handle, data, inlen); + *len = (size_t)sf_read_raw (context->handle, data, inlen); } else if (switch_test_flag(handle, SWITCH_FILE_DATA_INT)) { - *len = sf_readf_int(context->handle, (int *) data, inlen); + *len = (size_t)sf_readf_int(context->handle, (int *) data, inlen); } else if (switch_test_flag(handle, SWITCH_FILE_DATA_SHORT)) { - *len = sf_readf_short(context->handle, (short *) data, inlen); + *len = (size_t)sf_readf_short(context->handle, (short *) data, inlen); } else if (switch_test_flag(handle, SWITCH_FILE_DATA_FLOAT)) { - *len = sf_readf_float(context->handle, (float *) data, inlen); + *len = (size_t)sf_readf_float(context->handle, (float *) data, inlen); } else if (switch_test_flag(handle, SWITCH_FILE_DATA_DOUBLE)) { - *len = sf_readf_double(context->handle, (double *) data, inlen); + *len = (size_t)sf_readf_double(context->handle, (double *) data, inlen); } else { - *len = sf_readf_int(context->handle, (int *) data, inlen); + *len = (size_t)sf_readf_int(context->handle, (int *) data, inlen); } return SWITCH_STATUS_SUCCESS; @@ -167,21 +167,21 @@ switch_status sndfile_file_read (switch_file_handle *handle, void *data, size_t switch_status sndfile_file_write (switch_file_handle *handle, void *data, size_t *len) { - unsigned int inlen = *len; + size_t inlen = *len; sndfile_context *context = handle->private; if (switch_test_flag(handle, SWITCH_FILE_DATA_RAW)) { - *len = sf_write_raw (context->handle, data, inlen); + *len = (size_t)sf_write_raw (context->handle, data, inlen); } else if (switch_test_flag(handle, SWITCH_FILE_DATA_INT)) { - *len = sf_writef_int(context->handle, (int *) data, inlen); + *len = (size_t)sf_writef_int(context->handle, (int *) data, inlen); } else if (switch_test_flag(handle, SWITCH_FILE_DATA_SHORT)) { - *len = sf_writef_short(context->handle, (short *) data, inlen); + *len = (size_t)sf_writef_short(context->handle, (short *) data, inlen); } else if (switch_test_flag(handle, SWITCH_FILE_DATA_FLOAT)) { - *len = sf_writef_float(context->handle, (float *) data, inlen); + *len = (size_t)sf_writef_float(context->handle, (float *) data, inlen); } else if (switch_test_flag(handle, SWITCH_FILE_DATA_DOUBLE)) { - *len = sf_writef_double(context->handle, (double *) data, inlen); + *len = (size_t)sf_writef_double(context->handle, (double *) data, inlen); } else { - *len = sf_writef_int(context->handle, (int *) data, inlen); + *len = (size_t)sf_writef_int(context->handle, (int *) data, inlen); } return SWITCH_STATUS_SUCCESS; diff --git a/src/mod/mod_speexcodec/mod_speexcodec.c b/src/mod/mod_speexcodec/mod_speexcodec.c index 41993cba11..933883d2e4 100644 --- a/src/mod/mod_speexcodec/mod_speexcodec.c +++ b/src/mod/mod_speexcodec/mod_speexcodec.c @@ -50,8 +50,8 @@ const struct switch_codec_settings default_codec_settings = { /*.pp_agc_level*/ 8000, /*.pp_denoise*/ 0, /*.pp_dereverb*/ 0, - /*.pp_dereverb_decay*/ 0.4, - /*.pp_dereverb_level*/ 0.3, + /*.pp_dereverb_decay*/ 0.4f, + /*.pp_dereverb_level*/ 0.3f, }; struct speex_context { @@ -226,7 +226,7 @@ static switch_status switch_speex_decode(switch_codec *codec, if (*flag & SWITCH_CODEC_FLAG_SILENCE) { speex_decode_int(context->decoder_state, NULL, buf); } else { - speex_bits_read_from(&context->decoder_bits, (char *)encoded_data, *decoded_data_len); + speex_bits_read_from(&context->decoder_bits, (char *)encoded_data, (int)*decoded_data_len); speex_decode_int(context->decoder_state, &context->decoder_bits, buf); }