diff --git a/libs/esl/src/esl_event.c b/libs/esl/src/esl_event.c index 380b122228..24f7163976 100644 --- a/libs/esl/src/esl_event.c +++ b/libs/esl/src/esl_event.c @@ -508,6 +508,11 @@ static esl_status_t esl_event_base_add_header(esl_event_t *event, esl_stack_t st header = new_header(header_name); } +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable : 6385 6386) +#endif + if ((stack & ESL_STACK_PUSH) || (stack & ESL_STACK_UNSHIFT)) { char **m = NULL; esl_size_t len = 0; @@ -546,6 +551,10 @@ static esl_status_t esl_event_base_add_header(esl_event_t *event, esl_stack_t st len += strlen(header->array[j]) + 2; } +#ifdef _MSC_VER +#pragma warning(pop) +#endif + if (len) { len += 8; hv = realloc(header->value, len); diff --git a/libs/libnatpmp/natpmp.c b/libs/libnatpmp/natpmp.c index d2ff9d5fd3..e3ab64af7d 100644 --- a/libs/libnatpmp/natpmp.c +++ b/libs/libnatpmp/natpmp.c @@ -29,8 +29,12 @@ #include #include #include +#ifndef EWOULDBLOCK #define EWOULDBLOCK WSAEWOULDBLOCK +#endif +#ifndef ECONNREFUSED #define ECONNREFUSED WSAECONNREFUSED +#endif static int gettimeofday(struct timeval* p, void* tz /* IGNORED */) { union { diff --git a/src/mod/applications/mod_spandsp/mod_spandsp.2015.vcxproj b/src/mod/applications/mod_spandsp/mod_spandsp.2015.vcxproj index a27a417165..25cc04caec 100644 --- a/src/mod/applications/mod_spandsp/mod_spandsp.2015.vcxproj +++ b/src/mod/applications/mod_spandsp/mod_spandsp.2015.vcxproj @@ -89,7 +89,7 @@ %(RootDir)%(Directory)..\..\..\..\libs\spandsp\src\msvc;%(RootDir)%(Directory)..\..\..\..\libs\spandsp\src;%(RootDir)%(Directory)..\..\..\..\libs\tiff-4.0.2\libtiff;%(RootDir)%(Directory)..\..\..\..\libs\jpeg-8d;%(AdditionalIncludeDirectories) - 4024;4047;4324;6340;6246;6011;6387;%(DisableSpecificWarnings) + 6031;4456;4024;4047;4324;6340;6246;6011;6387;%(DisableSpecificWarnings) false @@ -107,7 +107,7 @@ %(RootDir)%(Directory)..\..\..\..\libs\spandsp\src\msvc;%(RootDir)%(Directory)..\..\..\..\libs\spandsp\src;%(RootDir)%(Directory)..\..\..\..\libs\tiff-4.0.2\libtiff;%(RootDir)%(Directory)..\..\..\..\libs\jpeg-8d;%(AdditionalIncludeDirectories) - 4024;4047;4324;6340;6246;6011;6387;%(DisableSpecificWarnings) + 6031;4456;4024;4047;4324;6340;6246;6011;6387;%(DisableSpecificWarnings) false @@ -123,7 +123,7 @@ %(RootDir)%(Directory)..\..\..\..\libs\spandsp\src\msvc;%(RootDir)%(Directory)..\..\..\..\libs\spandsp\src;%(RootDir)%(Directory)..\..\..\..\libs\tiff-4.0.2\libtiff;%(RootDir)%(Directory)..\..\..\..\libs\jpeg-8d;%(AdditionalIncludeDirectories) - 4024;4047;4324;6340;6246;6011;6387;%(DisableSpecificWarnings) + 6031;4456;4024;4047;4324;6340;6246;6011;6387;%(DisableSpecificWarnings) false @@ -141,7 +141,7 @@ %(RootDir)%(Directory)..\..\..\..\libs\spandsp\src\msvc;%(RootDir)%(Directory)..\..\..\..\libs\spandsp\src;%(RootDir)%(Directory)..\..\..\..\libs\tiff-4.0.2\libtiff;%(RootDir)%(Directory)..\..\..\..\libs\jpeg-8d;%(AdditionalIncludeDirectories) - 4024;4047;4324;6340;6246;6011;6387;%(DisableSpecificWarnings) + 6031;4456;4024;4047;4324;6340;6246;6011;6387;%(DisableSpecificWarnings) false diff --git a/src/mod/applications/mod_valet_parking/mod_valet_parking.2015.vcxproj b/src/mod/applications/mod_valet_parking/mod_valet_parking.2015.vcxproj index dcad26393f..12c778be1c 100644 --- a/src/mod/applications/mod_valet_parking/mod_valet_parking.2015.vcxproj +++ b/src/mod/applications/mod_valet_parking/mod_valet_parking.2015.vcxproj @@ -72,6 +72,7 @@ + 4456;6340;6246;6011;6387;%(DisableSpecificWarnings) false @@ -86,6 +87,7 @@ + 4456;6340;6246;6011;6387;%(DisableSpecificWarnings) false @@ -98,6 +100,7 @@ + 4456;6340;6246;6011;6387;%(DisableSpecificWarnings) false @@ -112,6 +115,7 @@ + 4456;6340;6246;6011;6387;%(DisableSpecificWarnings) false diff --git a/src/mod/applications/mod_voicemail/mod_voicemail.c b/src/mod/applications/mod_voicemail/mod_voicemail.c index 9ccb898b49..da6180aa98 100644 --- a/src/mod/applications/mod_voicemail/mod_voicemail.c +++ b/src/mod/applications/mod_voicemail/mod_voicemail.c @@ -3083,11 +3083,8 @@ static switch_status_t deliver_vm(vm_profile_t *profile, } } - if (session) { - switch_channel_t *channel = switch_core_session_get_channel(session); - if (channel && (vm_switch_cc_tmp = switch_channel_get_variable(channel, "vm_cc"))) { - vm_cc = vm_switch_cc_tmp; - } + if (channel && (vm_switch_cc_tmp = switch_channel_get_variable(channel, "vm_cc"))) { + vm_cc = vm_switch_cc_tmp; } if (vm_cc) { @@ -4283,7 +4280,7 @@ static int web_callback(void *pArg, int argc, char **argv, char **columnNames) char *del, *get, *fname, *ext; switch_time_exp_t tm; char create_date[80] = ""; - char read_date[80] = ""; + char read_date[80] = { 0 }; char rss_date[80] = ""; switch_size_t retsize; switch_time_t l_created = 0; @@ -4370,8 +4367,8 @@ static int rss_callback(void *pArg, int argc, char **argv, char **columnNames) char *tmp, *del, *get; switch_time_exp_t tm; char create_date[80] = ""; - char read_date[80] = ""; - char rss_date[80] = ""; + char read_date[80] = { 0 }; + char rss_date[80] = { 0 }; switch_size_t retsize; const char *mime_type = "audio/inline", *new_type; char *ext; @@ -5836,7 +5833,7 @@ SWITCH_STANDARD_API(vm_fsdb_msg_forward_function) file_path = switch_event_get_header(cbt.my_params, "VM-Message-File-Path"); if (file_path && switch_file_exists(file_path, pool) == SWITCH_STATUS_SUCCESS) { const char *new_file_path = file_path; - const char *cmd = NULL; + const char *command = NULL; if (prepend_file_path && switch_file_exists(prepend_file_path, pool) == SWITCH_STATUS_SUCCESS) { @@ -5859,8 +5856,8 @@ SWITCH_STANDARD_API(vm_fsdb_msg_forward_function) } } - cmd = switch_core_sprintf(pool, "%s@%s %s %s '%s'", dst_id, dst_domain, new_file_path, switch_event_get_header(cbt.my_params, "VM-Message-Caller-Number"), switch_event_get_header(cbt.my_params, "VM-Message-Caller-Name")); - if (voicemail_inject(cmd, NULL) == SWITCH_STATUS_SUCCESS) { + command = switch_core_sprintf(pool, "%s@%s %s %s '%s'", dst_id, dst_domain, new_file_path, switch_event_get_header(cbt.my_params, "VM-Message-Caller-Number"), switch_event_get_header(cbt.my_params, "VM-Message-Caller-Name")); + if (voicemail_inject(command, NULL) == SWITCH_STATUS_SUCCESS) { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Sent Carbon Copy to %s@%s\n", dst_id, dst_domain); } else { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Failed to Carbon Copy to %s@%s\n", dst_id, dst_domain); diff --git a/src/mod/endpoints/mod_skypopen/mod_skypopen.2015.vcxproj b/src/mod/endpoints/mod_skypopen/mod_skypopen.2015.vcxproj index 0bf70fbbf8..7d2aad6932 100644 --- a/src/mod/endpoints/mod_skypopen/mod_skypopen.2015.vcxproj +++ b/src/mod/endpoints/mod_skypopen/mod_skypopen.2015.vcxproj @@ -75,7 +75,7 @@ Level4 false - 4324;6340;6246;6011;6387;%(DisableSpecificWarnings) + 4456;6031;4324;6340;6246;6011;6387;%(DisableSpecificWarnings) rpcrt4.lib "..\..\..\..\libs\spandsp\src\Win32\Debug\libtiff.lib" "..\..\..\..\Win32\Debug\libspandsp.lib" %(AdditionalOptions) @@ -91,7 +91,7 @@ Level4 false - 4324;6340;6246;6011;6387;%(DisableSpecificWarnings) + 4456;6031;4324;6340;6246;6011;6387;%(DisableSpecificWarnings) rpcrt4.lib "..\..\..\..\libs\spandsp\src\x64\Debug\libtiff.lib" "..\..\..\..\x64\Debug\libspandsp.lib" %(AdditionalOptions) @@ -105,7 +105,7 @@ %(RootDir)%(Directory)..\..\..\..\libs\spandsp\src\msvc;%(RootDir)%(Directory)..\..\..\..\libs\spandsp\src;%(RootDir)%(Directory)..\..\..\..\libs\tiff-4.0.2\libtiff;%(RootDir)%(Directory)..\..\..\..\libs\jpeg-8d;%(AdditionalIncludeDirectories) - 4324;6340;6246;6011;6387;%(DisableSpecificWarnings) + 4456;6031;4324;6340;6246;6011;6387;%(DisableSpecificWarnings) rpcrt4.lib "..\..\..\..\libs\spandsp\src\Win32\Release\libtiff.lib" "..\..\..\..\Win32\Release\libspandsp.lib" %(AdditionalOptions) @@ -119,7 +119,7 @@ %(RootDir)%(Directory)..\..\..\..\libs\spandsp\src\msvc;%(RootDir)%(Directory)..\..\..\..\libs\spandsp\src;%(RootDir)%(Directory)..\..\..\..\libs\tiff-4.0.2\libtiff;%(RootDir)%(Directory)..\..\..\..\libs\jpeg-8d;%(AdditionalIncludeDirectories) - 4324;6340;6246;6011;6387;%(DisableSpecificWarnings) + 4456;6031;4324;6340;6246;6011;6387;%(DisableSpecificWarnings) rpcrt4.lib "..\..\..\..\libs\spandsp\src\x64\Release\libtiff.lib" "..\..\..\..\x64\Release\libspandsp.lib" %(AdditionalOptions) diff --git a/src/mod/endpoints/mod_skypopen/skypopen_protocol.c b/src/mod/endpoints/mod_skypopen/skypopen_protocol.c index cc6a50adfc..a64cbd074d 100644 --- a/src/mod/endpoints/mod_skypopen/skypopen_protocol.c +++ b/src/mod/endpoints/mod_skypopen/skypopen_protocol.c @@ -1466,7 +1466,7 @@ LRESULT APIENTRY skypopen_present(HWND hWindow, UINT uiMessage, WPARAM uiParam, lReturnCode = 0; fIssueDefProc = 0; - tech_pvt = (private_t *) GetWindowLong(hWindow, GWLP_USERDATA); + tech_pvt = (private_t *)(intptr_t) GetWindowLong(hWindow, GWLP_USERDATA); if (!running) { DEBUGA_SKYPE("let's DIE!\n", SKYPOPEN_P_LOG); @@ -1477,7 +1477,7 @@ LRESULT APIENTRY skypopen_present(HWND hWindow, UINT uiMessage, WPARAM uiParam, switch (uiMessage) { case WM_CREATE: tech_pvt = (private_t *) ((LPCREATESTRUCT) ulParam)->lpCreateParams; - SetWindowLong(hWindow, GWLP_USERDATA, (LONG) tech_pvt); + SetWindowLong(hWindow, GWLP_USERDATA, (LONG) (intptr_t)tech_pvt); DEBUGA_SKYPE("got CREATE\n", SKYPOPEN_P_LOG); break; case WM_DESTROY: diff --git a/src/mod/endpoints/mod_verto/mod_verto.2015.vcxproj b/src/mod/endpoints/mod_verto/mod_verto.2015.vcxproj index 2d18528bdc..e71f52a081 100644 --- a/src/mod/endpoints/mod_verto/mod_verto.2015.vcxproj +++ b/src/mod/endpoints/mod_verto/mod_verto.2015.vcxproj @@ -138,7 +138,12 @@ - + + 6386;4267;4244;6031;6340;6246;6011;6387;%(DisableSpecificWarnings) + 6386;4267;4244;6031;6340;6246;6011;6387;%(DisableSpecificWarnings) + 6386;4267;4244;6031;6340;6246;6011;6387;%(DisableSpecificWarnings) + 6386;4267;4244;6031;6340;6246;6011;6387;%(DisableSpecificWarnings) + diff --git a/src/mod/endpoints/mod_verto/ws.c b/src/mod/endpoints/mod_verto/ws.c index 6e9a69d025..266cc74432 100644 --- a/src/mod/endpoints/mod_verto/ws.c +++ b/src/mod/endpoints/mod_verto/ws.c @@ -146,7 +146,7 @@ static int cheezy_get_var(char *data, char *name, char *buf, size_t buflen) } while((p = (strstr(p,"\n")+1))!=(char *)1); - if (p != (char *)1 && *p!='\0') { + if (p && p != (char *)1 && *p!='\0') { char *v, *e = 0; v = strchr(p, ':'); diff --git a/src/mod/say/mod_say_zh/mod_say_zh.2015.vcxproj b/src/mod/say/mod_say_zh/mod_say_zh.2015.vcxproj index 94487dd2a2..25d0e192a7 100644 --- a/src/mod/say/mod_say_zh/mod_say_zh.2015.vcxproj +++ b/src/mod/say/mod_say_zh/mod_say_zh.2015.vcxproj @@ -72,6 +72,7 @@ + 6031;6340;6246;6011;6387;%(DisableSpecificWarnings) false @@ -86,6 +87,7 @@ + 6031;6340;6246;6011;6387;%(DisableSpecificWarnings) false @@ -98,6 +100,7 @@ + 6031;6340;6246;6011;6387;%(DisableSpecificWarnings) false @@ -112,6 +115,7 @@ + 6031;6340;6246;6011;6387;%(DisableSpecificWarnings) false diff --git a/src/mod/xml_int/mod_xml_rpc/mod_xml_rpc.c b/src/mod/xml_int/mod_xml_rpc/mod_xml_rpc.c index c271ffb359..3871993078 100644 --- a/src/mod/xml_int/mod_xml_rpc/mod_xml_rpc.c +++ b/src/mod/xml_int/mod_xml_rpc/mod_xml_rpc.c @@ -632,9 +632,9 @@ abyss_bool websocket_hook(TSession *r) switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "continue\n"); continue; case WSOC_TEXT: - p = data; + p = (char *)data; if (!p) continue; - if (!strncasecmp(data, "event ", 6)) { + if (!strncasecmp((char *)data, "event ", 6)) { switch_event_types_t type; char *subclass; diff --git a/src/mod/xml_int/mod_xml_rpc/ws.c b/src/mod/xml_int/mod_xml_rpc/ws.c index 7247ddb4ba..76f66bcfc9 100644 --- a/src/mod/xml_int/mod_xml_rpc/ws.c +++ b/src/mod/xml_int/mod_xml_rpc/ws.c @@ -406,10 +406,12 @@ issize_t ws_read_frame(wsh_t *wsh, ws_opcode_t *oc, uint8_t **data) if ((wsh->datalen = ws_raw_read(wsh, wsh->buffer, 14)) < need) { while (!wsh->down && (wsh->datalen += ws_raw_read(wsh, wsh->buffer + wsh->datalen, 14 - wsh->datalen)) < need) ; +#if 0 if (0 && (wsh->datalen += ws_raw_read(wsh, wsh->buffer + wsh->datalen, 14 - wsh->datalen)) < need) { /* too small - protocol err */ return ws_close(wsh, WS_PROTO_ERR); } +#endif } *oc = *wsh->buffer & 0xf; @@ -600,7 +602,7 @@ issize_t ws_write_frame(wsh_t *wsh, ws_opcode_t oc, void *data, size_t bytes) hlen += 8; u64 = (uint64_t *) &hdr[2]; - *u64 = htonl(bytes); + *u64 = htonl((unsigned long)bytes); } if (ws_raw_write(wsh, (void *) &hdr[0], hlen) != (issize_t)hlen) {