FS-8389: [build] Fix msvc 2015 build warnings

This commit is contained in:
Mike Jerris 2015-10-26 13:45:48 -04:00
parent 37263d47d5
commit 6b5b1a3d86
6 changed files with 26 additions and 19 deletions

View File

@ -859,7 +859,7 @@ static inline switch_bool_t switch_strstr(char *s, char *q)
S = strdup(s); S = strdup(s);
assert(S != NULL); switch_assert(S != NULL);
for (p = S; p && *p; p++) { for (p = S; p && *p; p++) {
*p = (char) switch_toupper(*p); *p = (char) switch_toupper(*p);
@ -871,7 +871,7 @@ static inline switch_bool_t switch_strstr(char *s, char *q)
} }
Q = strdup(q); Q = strdup(q);
assert(Q != NULL); switch_assert(Q != NULL);
for (p = Q; p && *p; p++) { for (p = Q; p && *p; p++) {
*p = (char) switch_toupper(*p); *p = (char) switch_toupper(*p);

View File

@ -1483,7 +1483,7 @@ void *SWITCH_THREAD_FUNC conference_video_muxing_write_thread_run(switch_thread_
switch_time_t now = switch_time_now(); switch_time_t now = switch_time_now();
if (last) { if (last) {
int delta = now - last; int delta = (int)(now - last);
if (delta > member->conference->video_fps.ms * 5000) { if (delta > member->conference->video_fps.ms * 5000) {
switch_core_session_request_video_refresh(member->session); switch_core_session_request_video_refresh(member->session);
} }

View File

@ -858,8 +858,9 @@ static switch_status_t switch_opus_encode_repacketize(switch_codec_t *codec,
int16_t *dec_ptr_buf = decoded_data; int16_t *dec_ptr_buf = decoded_data;
/* work inside the available buffer to avoid other buffer allocations. *encoded_data_len will be SWITCH_RECOMMENDED_BUFFER_SIZE */ /* work inside the available buffer to avoid other buffer allocations. *encoded_data_len will be SWITCH_RECOMMENDED_BUFFER_SIZE */
unsigned char *enc_ptr_buf = (unsigned char *)encoded_data + (len / 2); unsigned char *enc_ptr_buf = (unsigned char *)encoded_data + (len / 2);
int nb_frames = codec->implementation->microseconds_per_packet / 20000 ; /* requested ptime: 20 ms * nb_frames */ uint32_t nb_frames = codec->implementation->microseconds_per_packet / 20000 ; /* requested ptime: 20 ms * nb_frames */
int frame_size, i, bytes = 0, want_fec = 0, toggle_fec = 0; uint32_t frame_size, i;
int bytes = 0, want_fec = 0, toggle_fec = 0;
opus_int32 ret = 0; opus_int32 ret = 0;
opus_int32 total_len = 0; opus_int32 total_len = 0;
switch_status_t status = SWITCH_STATUS_SUCCESS; switch_status_t status = SWITCH_STATUS_SUCCESS;
@ -879,7 +880,7 @@ static switch_status_t switch_opus_encode_repacketize(switch_codec_t *codec,
} }
frame_size = (decoded_data_len / 2) / nb_frames; frame_size = (decoded_data_len / 2) / nb_frames;
if((frame_size * nb_frames) != context->enc_frame_size) { if((frame_size * nb_frames) != context->enc_frame_size) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR,"Encoder Error: Decoded Datalen %u Number of frames: %d Encoder frame size: %d\n",decoded_data_len,nb_frames,context->enc_frame_size); switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR,"Encoder Error: Decoded Datalen %u Number of frames: %u Encoder frame size: %u\n",decoded_data_len,nb_frames,context->enc_frame_size);
switch_goto_status(SWITCH_STATUS_GENERR, end); switch_goto_status(SWITCH_STATUS_GENERR, end);
} }
opus_repacketizer_init(rp); opus_repacketizer_init(rp);
@ -1080,13 +1081,13 @@ static switch_status_t switch_opus_control(switch_codec_t *codec,
switch(cmd) { switch(cmd) {
case SCC_CODEC_SPECIFIC: case SCC_CODEC_SPECIFIC:
{ {
const char *cmd = (const char *)cmd_data; const char *command = (const char *)cmd_data;
const char *arg = (const char *)cmd_arg; const char *arg = (const char *)cmd_arg;
switch_codec_control_type_t reply_type = SCCT_STRING; switch_codec_control_type_t reply_type = SCCT_STRING;
const char *reply = "ERROR INVALID COMMAND"; const char *reply = "ERROR INVALID COMMAND";
if (!zstr(cmd)) { if (!zstr(command)) {
if (!strcasecmp(cmd, "jb_lookahead")) { if (!strcasecmp(command, "jb_lookahead")) {
if (!zstr(arg)) { if (!zstr(arg)) {
context->use_jb_lookahead = switch_true(arg); context->use_jb_lookahead = switch_true(arg);
} }

View File

@ -130,9 +130,12 @@
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemGroup> <ItemGroup>
<ClCompile Include="mod_skypopen.c"> <ClCompile Include="mod_skypopen.c">
<AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">/analyze:stacksize65535</AdditionalOptions> <AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">/analyze:stacksize65535</AdditionalOptions> </AdditionalOptions>
<AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">/analyze:stacksize65535</AdditionalOptions> <AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
</AdditionalOptions>
<AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
</AdditionalOptions>
<AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
</AdditionalOptions> </AdditionalOptions>
</ClCompile> </ClCompile>
@ -141,9 +144,12 @@
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4305;4306;28193;4244;4267;4324;6340;6246;6011;6387;%(DisableSpecificWarnings)</DisableSpecificWarnings> <DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4305;4306;28193;4244;4267;4324;6340;6246;6011;6387;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">4305;4306;28193;4244;4267;4324;6340;6246;6011;6387;%(DisableSpecificWarnings)</DisableSpecificWarnings> <DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">4305;4306;28193;4244;4267;4324;6340;6246;6011;6387;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|x64'">4305;4306;28193;4244;4267;4324;6340;6246;6011;6387;%(DisableSpecificWarnings)</DisableSpecificWarnings> <DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|x64'">4305;4306;28193;4244;4267;4324;6340;6246;6011;6387;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">/analyze:stacksize32768</AdditionalOptions> <AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">/analyze:stacksize32768</AdditionalOptions> </AdditionalOptions>
<AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">/analyze:stacksize32768</AdditionalOptions> <AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
</AdditionalOptions>
<AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
</AdditionalOptions>
<AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
</AdditionalOptions> </AdditionalOptions>
</ClCompile> </ClCompile>

View File

@ -5850,7 +5850,7 @@ static void sofia_handle_sip_r_options(switch_core_session_t *session, int statu
int ping_time = 0; int ping_time = 0;
if (sofia_private && sofia_private->ping_sent) { if (sofia_private && sofia_private->ping_sent) {
ping_time = switch_time_now() - sofia_private->ping_sent; ping_time = (int)(switch_time_now() - sofia_private->ping_sent);
} }
sip_user_status.status = ping_status; sip_user_status.status = ping_status;

View File

@ -493,7 +493,7 @@ static void *SWITCH_THREAD_FUNC read_stream_thread(switch_thread_t *thread, void
break; break;
} }
source->prebuf = source->samples * 2 * source->channels; source->prebuf = (uint32_t)(source->samples * 2 * source->channels);
if (!source->total) { if (!source->total) {
flush_video_queue(source->video_q); flush_video_queue(source->video_q);
@ -806,8 +806,8 @@ static switch_status_t local_stream_file_read_video(switch_file_handle_t *handle
local_stream_context_t *context = handle->private_info; local_stream_context_t *context = handle->private_info;
switch_status_t status; switch_status_t status;
switch_time_t now; switch_time_t now;
int fps = (int)ceil(handle->mm.fps); unsigned int fps = (unsigned int)ceil(handle->mm.fps);
int min_qsize = fps; unsigned int min_qsize = fps;
if (!(context->ready && context->source->ready)) { if (!(context->ready && context->source->ready)) {
return SWITCH_STATUS_FALSE; return SWITCH_STATUS_FALSE;