From 74d14b25f7221741e2305b80dfb06c11da30faf9 Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Fri, 31 Mar 2006 16:10:00 +0000 Subject: [PATCH] tweak to repair some damage from icc tweaks git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@992 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/include/switch_channel.h | 2 +- src/include/switch_module_interfaces.h | 2 +- src/include/switch_platform.h | 3 ++- src/mod/languages/mod_perl/switch_swig.c | 3 ++- src/switch_channel.c | 4 ++-- src/switch_ivr.c | 5 +++-- src/switch_loadable_module.c | 2 +- w32/vsnet/FreeSwitchCore.vcproj | 8 -------- 8 files changed, 12 insertions(+), 17 deletions(-) diff --git a/src/include/switch_channel.h b/src/include/switch_channel.h index 417edfe979..bae9adc42b 100644 --- a/src/include/switch_channel.h +++ b/src/include/switch_channel.h @@ -299,7 +299,7 @@ SWITCH_DECLARE(switch_status) switch_channel_queue_dtmf(switch_channel *channel, \param len max size in bytes of the buffer \return number of bytes read into the buffer */ -SWITCH_DECLARE(int) switch_channel_dequeue_dtmf(switch_channel *channel, char *dtmf, switch_size_t len); +SWITCH_DECLARE(switch_size_t) switch_channel_dequeue_dtmf(switch_channel *channel, char *dtmf, switch_size_t len); /*! \brief Render the name of the provided state enum diff --git a/src/include/switch_module_interfaces.h b/src/include/switch_module_interfaces.h index e3827175dc..27343871e5 100644 --- a/src/include/switch_module_interfaces.h +++ b/src/include/switch_module_interfaces.h @@ -433,7 +433,7 @@ struct switch_codec_implementation { /*! max number of frames to send in one network packet */ int max_frames_per_packet; /*! function to initialize a codec handle using this implementation */ - switch_status (*init)(switch_codec *, uint32_t, const switch_codec_settings *codec_settings); + switch_status (*init)(switch_codec *, switch_codec_flag, const switch_codec_settings *codec_settings); /*! function to encode raw data into encoded data */ switch_status (*encode)(switch_codec *codec, switch_codec *other_codec, diff --git a/src/include/switch_platform.h b/src/include/switch_platform.h index 4f62832be8..b83ff4f6c9 100644 --- a/src/include/switch_platform.h +++ b/src/include/switch_platform.h @@ -59,8 +59,9 @@ extern "C" { * C4200: Non standard extension C zero sized array * C4204: nonstandard extension used : non-constant aggregate initializer * C4706: assignment within conditional expression + * C4055: type cast from data pointer to function pointer (apr carries function pointers as data pointers) */ -#pragma warning(disable:4152 4054 4100 4142 4200 4204 4706) +#pragma warning(disable:4152 4054 4100 4142 4200 4204 4706 4055) #if (_MSC_VER >= 1400) // VC8+ #ifndef _CRT_SECURE_NO_DEPRECATE diff --git a/src/mod/languages/mod_perl/switch_swig.c b/src/mod/languages/mod_perl/switch_swig.c index 2d46c54631..a6d8fc7daa 100644 --- a/src/mod/languages/mod_perl/switch_swig.c +++ b/src/mod/languages/mod_perl/switch_swig.c @@ -115,11 +115,12 @@ void fs_channel_set_state(struct switch_core_session *session, char *state) int fs_ivr_play_file(struct switch_core_session *session, char *file, char *timer_name) { + switch_status status; if (switch_strlen_zero(timer_name)) { timer_name = NULL; } - switch_status status = switch_ivr_play_file(session, NULL, file, timer_name, NULL, NULL, 0); + status = switch_ivr_play_file(session, NULL, file, timer_name, NULL, NULL, 0); return status == SWITCH_STATUS_SUCCESS ? 1 : 0; } diff --git a/src/switch_channel.c b/src/switch_channel.c index 6b2190aa05..c5fd717876 100644 --- a/src/switch_channel.c +++ b/src/switch_channel.c @@ -150,9 +150,9 @@ SWITCH_DECLARE(switch_status) switch_channel_queue_dtmf(switch_channel *channel, } -SWITCH_DECLARE(int) switch_channel_dequeue_dtmf(switch_channel *channel, char *dtmf, switch_size_t len) +SWITCH_DECLARE(switch_size_t) switch_channel_dequeue_dtmf(switch_channel *channel, char *dtmf, switch_size_t len) { - int bytes; + switch_size_t bytes; switch_event *event; assert(channel != NULL); diff --git a/src/switch_ivr.c b/src/switch_ivr.c index 85cce5e728..2c07c7667f 100644 --- a/src/switch_ivr.c +++ b/src/switch_ivr.c @@ -500,7 +500,7 @@ SWITCH_DECLARE(switch_status) switch_ivr_speak_text(switch_core_session *session switch_status status = SWITCH_STATUS_SUCCESS; switch_speech_handle sh; - uint32_t flags = SWITCH_SPEECH_FLAG_TTS; + switch_speech_flag flags = SWITCH_SPEECH_FLAG_TTS; memset(&sh, 0, sizeof(sh)); @@ -691,11 +691,12 @@ static void *audio_bridge_thread(switch_thread *thread, void *obj) switch_dtmf_callback_function dtmf_callback; void *user_data; - assert(!thread || thread); switch_channel *chan_a, *chan_b; switch_frame *read_frame; switch_core_session *session_a, *session_b; + assert(!thread || thread); + session_a = data->objs[0]; session_b = data->objs[1]; diff --git a/src/switch_loadable_module.c b/src/switch_loadable_module.c index 5830b482b7..7b78977dd4 100644 --- a/src/switch_loadable_module.c +++ b/src/switch_loadable_module.c @@ -73,13 +73,13 @@ static struct switch_loadable_module_container loadable_modules; static void *switch_loadable_module_exec(switch_thread *thread, void *obj) { - assert(thread != NULL); switch_status status = SWITCH_STATUS_SUCCESS; switch_core_thread_session *ts = obj; switch_loadable_module *module = ts->objs[0]; int restarts; + assert(thread != NULL); assert(module != NULL); for (restarts = 0; status != SWITCH_STATUS_TERM; restarts++) { diff --git a/w32/vsnet/FreeSwitchCore.vcproj b/w32/vsnet/FreeSwitchCore.vcproj index 6f8bea4ef1..d868aacfc9 100644 --- a/w32/vsnet/FreeSwitchCore.vcproj +++ b/w32/vsnet/FreeSwitchCore.vcproj @@ -231,10 +231,6 @@ RelativePath="..\..\src\switch_loadable_module.c" > - - @@ -301,10 +297,6 @@ RelativePath="..\..\src\include\switch_module_interfaces.h" > - -