FS-7966: fix more warnings in msvc 2015 build
This commit is contained in:
parent
4d16691a22
commit
288c62576f
|
@ -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);
|
||||
|
|
|
@ -29,8 +29,12 @@
|
|||
#include <winsock2.h>
|
||||
#include <Ws2tcpip.h>
|
||||
#include <io.h>
|
||||
#ifndef EWOULDBLOCK
|
||||
#define EWOULDBLOCK WSAEWOULDBLOCK
|
||||
#endif
|
||||
#ifndef ECONNREFUSED
|
||||
#define ECONNREFUSED WSAECONNREFUSED
|
||||
#endif
|
||||
|
||||
static int gettimeofday(struct timeval* p, void* tz /* IGNORED */) {
|
||||
union {
|
||||
|
|
|
@ -89,7 +89,7 @@
|
|||
<AdditionalIncludeDirectories>%(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)</AdditionalIncludeDirectories>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<DisableSpecificWarnings>4024;4047;4324;6340;6246;6011;6387;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<DisableSpecificWarnings>6031;4456;4024;4047;4324;6340;6246;6011;6387;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<EnablePREfast>false</EnablePREfast>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
|
@ -107,7 +107,7 @@
|
|||
<AdditionalIncludeDirectories>%(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)</AdditionalIncludeDirectories>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<DisableSpecificWarnings>4024;4047;4324;6340;6246;6011;6387;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<DisableSpecificWarnings>6031;4456;4024;4047;4324;6340;6246;6011;6387;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<EnablePREfast>false</EnablePREfast>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
|
@ -123,7 +123,7 @@
|
|||
<AdditionalIncludeDirectories>%(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)</AdditionalIncludeDirectories>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<DisableSpecificWarnings>4024;4047;4324;6340;6246;6011;6387;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<DisableSpecificWarnings>6031;4456;4024;4047;4324;6340;6246;6011;6387;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<EnablePREfast>false</EnablePREfast>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
|
@ -141,7 +141,7 @@
|
|||
<AdditionalIncludeDirectories>%(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)</AdditionalIncludeDirectories>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<DisableSpecificWarnings>4024;4047;4324;6340;6246;6011;6387;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<DisableSpecificWarnings>6031;4456;4024;4047;4324;6340;6246;6011;6387;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<EnablePREfast>false</EnablePREfast>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
|
|
|
@ -72,6 +72,7 @@
|
|||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<DisableSpecificWarnings>4456;6340;6246;6011;6387;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
|
@ -86,6 +87,7 @@
|
|||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<DisableSpecificWarnings>4456;6340;6246;6011;6387;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
|
@ -98,6 +100,7 @@
|
|||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<DisableSpecificWarnings>4456;6340;6246;6011;6387;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
|
@ -112,6 +115,7 @@
|
|||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<DisableSpecificWarnings>4456;6340;6246;6011;6387;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
|
|
|
@ -3083,12 +3083,9 @@ 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 (vm_cc) {
|
||||
char *vm_cc_dup;
|
||||
|
@ -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);
|
||||
|
|
|
@ -75,7 +75,7 @@
|
|||
</PrecompiledHeader>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<TreatWarningAsError>false</TreatWarningAsError>
|
||||
<DisableSpecificWarnings>4324;6340;6246;6011;6387;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<DisableSpecificWarnings>4456;6031;4324;6340;6246;6011;6387;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalOptions>rpcrt4.lib "..\..\..\..\libs\spandsp\src\Win32\Debug\libtiff.lib" "..\..\..\..\Win32\Debug\libspandsp.lib" %(AdditionalOptions)</AdditionalOptions>
|
||||
|
@ -91,7 +91,7 @@
|
|||
</PrecompiledHeader>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<TreatWarningAsError>false</TreatWarningAsError>
|
||||
<DisableSpecificWarnings>4324;6340;6246;6011;6387;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<DisableSpecificWarnings>4456;6031;4324;6340;6246;6011;6387;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalOptions>rpcrt4.lib "..\..\..\..\libs\spandsp\src\x64\Debug\libtiff.lib" "..\..\..\..\x64\Debug\libspandsp.lib" %(AdditionalOptions)</AdditionalOptions>
|
||||
|
@ -105,7 +105,7 @@
|
|||
<AdditionalIncludeDirectories>%(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)</AdditionalIncludeDirectories>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<DisableSpecificWarnings>4324;6340;6246;6011;6387;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<DisableSpecificWarnings>4456;6031;4324;6340;6246;6011;6387;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalOptions>rpcrt4.lib "..\..\..\..\libs\spandsp\src\Win32\Release\libtiff.lib" "..\..\..\..\Win32\Release\libspandsp.lib" %(AdditionalOptions)</AdditionalOptions>
|
||||
|
@ -119,7 +119,7 @@
|
|||
<AdditionalIncludeDirectories>%(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)</AdditionalIncludeDirectories>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<DisableSpecificWarnings>4324;6340;6246;6011;6387;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<DisableSpecificWarnings>4456;6031;4324;6340;6246;6011;6387;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalOptions>rpcrt4.lib "..\..\..\..\libs\spandsp\src\x64\Release\libtiff.lib" "..\..\..\..\x64\Release\libspandsp.lib" %(AdditionalOptions)</AdditionalOptions>
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -138,7 +138,12 @@
|
|||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="mod_verto.c" />
|
||||
<ClCompile Include="ws.c" />
|
||||
<ClCompile Include="ws.c">
|
||||
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">6386;4267;4244;6031;6340;6246;6011;6387;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">6386;4267;4244;6031;6340;6246;6011;6387;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">6386;4267;4244;6031;6340;6246;6011;6387;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|x64'">6386;4267;4244;6031;6340;6246;6011;6387;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<ClCompile Include="mcast\mcast.c" />
|
||||
<ClCompile Include="mcast\mcast_cpp.cpp" />
|
||||
</ItemGroup>
|
||||
|
|
|
@ -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, ':');
|
||||
|
|
|
@ -72,6 +72,7 @@
|
|||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<DisableSpecificWarnings>6031;6340;6246;6011;6387;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
|
@ -86,6 +87,7 @@
|
|||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<DisableSpecificWarnings>6031;6340;6246;6011;6387;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
|
@ -98,6 +100,7 @@
|
|||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<DisableSpecificWarnings>6031;6340;6246;6011;6387;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
|
@ -112,6 +115,7 @@
|
|||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<DisableSpecificWarnings>6031;6340;6246;6011;6387;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue