FS-7966: fix more msvc 2015 build warnings.

This commit is contained in:
Mike Jerris 2015-09-02 13:06:29 -04:00
parent 08f634b215
commit 46c0d05216
20 changed files with 68 additions and 47 deletions

View File

@ -80,7 +80,7 @@
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>false</TreatWarningAsError>
<DisableSpecificWarnings>6031;4267;4244;4706;4100;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<DisableSpecificWarnings>28253;28252;6031;4267;4244;4706;4100;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<EnablePREfast>true</EnablePREfast>
</ClCompile>
</ItemDefinitionGroup>
@ -97,7 +97,7 @@
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>false</TreatWarningAsError>
<DisableSpecificWarnings>6031;4267;4244;4706;4100;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<DisableSpecificWarnings>28253;28252;6031;4267;4244;4706;4100;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<EnablePREfast>true</EnablePREfast>
</ClCompile>
</ItemDefinitionGroup>
@ -108,7 +108,7 @@
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>false</TreatWarningAsError>
<DisableSpecificWarnings>6031;4267;4244;4706;4100;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<DisableSpecificWarnings>28253;28252;6031;4267;4244;4706;4100;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<EnablePREfast>true</EnablePREfast>
</ClCompile>
</ItemDefinitionGroup>
@ -122,7 +122,7 @@
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>false</TreatWarningAsError>
<DisableSpecificWarnings>6031;4267;4244;4706;4100;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<DisableSpecificWarnings>28253;28252;6031;4267;4244;4706;4100;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<EnablePREfast>true</EnablePREfast>
</ClCompile>
</ItemDefinitionGroup>

View File

@ -137,7 +137,7 @@
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<WarningLevel>Level4</WarningLevel>
<DisableSpecificWarnings>4456;4457;4701;4702;4703;4100;4706;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<DisableSpecificWarnings>4718;4456;4457;4701;4702;4703;4100;4706;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
@ -146,7 +146,7 @@
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<WarningLevel>Level4</WarningLevel>
<DisableSpecificWarnings>4456;4457;4701;4702;4703;4100;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<DisableSpecificWarnings>4718;4456;4457;4701;4702;4703;4100;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug DLL|Win32'">
@ -161,7 +161,7 @@
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
<DisableSpecificWarnings>4456;4457;4701;4702;4703;4100;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<DisableSpecificWarnings>4718;4456;4457;4701;4702;4703;4100;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile>
<Link>
<AdditionalDependencies>libapr-1.lib;libaprutil-1.lib;iksemel.lib;Ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
@ -184,7 +184,7 @@
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<DisableSpecificWarnings>4456;4457;4701;4702;4703;4100;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<DisableSpecificWarnings>4718;4456;4457;4701;4702;4703;4100;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile>
<Link>
<AdditionalDependencies>libapr-1.lib;libaprutil-1.lib;iksemel.lib;Ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
@ -207,7 +207,7 @@
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<WarningLevel>Level4</WarningLevel>
<DisableSpecificWarnings>4456;4457;4701;4702;4703;4100;4706;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<DisableSpecificWarnings>4718;4456;4457;4701;4702;4703;4100;4706;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
@ -219,7 +219,7 @@
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<WarningLevel>Level4</WarningLevel>
<DisableSpecificWarnings>4456;4457;4701;4702;4703;4100;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<DisableSpecificWarnings>4718;4456;4457;4701;4702;4703;4100;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug DLL|x64'">
@ -237,7 +237,7 @@
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<DisableSpecificWarnings>4456;4457;4701;4702;4703;4100;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<DisableSpecificWarnings>4718;4456;4457;4701;4702;4703;4100;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile>
<Link>
<AdditionalDependencies>libapr-1.lib;libaprutil-1.lib;iksemel.lib;Ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
@ -264,7 +264,7 @@
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<DisableSpecificWarnings>4456;4457;4701;4702;4703;4100;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<DisableSpecificWarnings>4718;4456;4457;4701;4702;4703;4100;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile>
<Link>
<AdditionalDependencies>libapr-1.lib;libaprutil-1.lib;iksemel.lib;Ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>

View File

@ -81,6 +81,7 @@
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>false</TreatWarningAsError>
<EnablePREfast>true</EnablePREfast>
<DisableSpecificWarnings>28252;28253</DisableSpecificWarnings>
</ClCompile>
<Link>
<OptimizeReferences>false</OptimizeReferences>
@ -103,6 +104,7 @@
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>false</TreatWarningAsError>
<EnablePREfast>true</EnablePREfast>
<DisableSpecificWarnings>28252;28253</DisableSpecificWarnings>
</ClCompile>
<Link>
<OptimizeReferences>false</OptimizeReferences>
@ -120,6 +122,7 @@
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>false</TreatWarningAsError>
<EnablePREfast>true</EnablePREfast>
<DisableSpecificWarnings>28252;28253</DisableSpecificWarnings>
</ClCompile>
<Link>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
@ -136,6 +139,7 @@
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>false</TreatWarningAsError>
<EnablePREfast>true</EnablePREfast>
<DisableSpecificWarnings>28252;28253</DisableSpecificWarnings>
</ClCompile>
<Link>
<RandomizedBaseAddress>false</RandomizedBaseAddress>

View File

@ -141,7 +141,7 @@ SWITCH_DECLARE(switch_status_t) switch_log_unbind_logger(_In_ switch_log_functio
SWITCH_DECLARE(switch_log_level_t) switch_log_str2level(_In_z_ const char *str);
SWITCH_DECLARE(uint32_t) switch_log_str2mask(_In_z_ const char *str);
#define switch_log_check_mask(_mask, _level) (_mask & (1 << _level))
#define switch_log_check_mask(_mask, _level) (_mask & ((size_t)1 << _level))
SWITCH_DECLARE(switch_log_node_t *) switch_log_node_dup(const switch_log_node_t *node);

View File

@ -137,7 +137,7 @@ static void init_avmd_session_data(avmd_session_t *avmd_session, switch_core_se
{
/*! This is a worst case sample rate estimate */
avmd_session->rate = 48000;
INIT_CIRC_BUFFER(&avmd_session->b, BEEP_LEN(avmd_session->rate), FRAME_LEN(avmd_session->rate), fs_session);
INIT_CIRC_BUFFER(&avmd_session->b, (size_t)BEEP_LEN(avmd_session->rate), (size_t)FRAME_LEN(avmd_session->rate), fs_session);
avmd_session->session = fs_session;
avmd_session->pos = 0;

View File

@ -280,7 +280,7 @@ static void free_results(enum_record_t ** results)
static ldns_rdf *ldns_rdf_new_addr_frm_str(const char *str)
{
ldns_rdf *a;
ldns_rdf *a = NULL;
ldns_str2rdf_a(&a, str);

View File

@ -213,12 +213,15 @@ int exprValListGetAddress(exprValList * vlist, char *name, EXPRTYPE ** addr)
exprVal *cur;
int result;
if (vlist == NULL || addr == NULL)
if (addr == NULL)
return EXPR_ERROR_NULLPOINTER;
/* Not found yet */
*addr = NULL;
if (vlist == NULL)
return EXPR_ERROR_NULLPOINTER;
if (name == NULL || name[0] == '\0')
return EXPR_ERROR_NOTFOUND;

View File

@ -950,7 +950,7 @@ end:
static switch_status_t fsv_file_write(switch_file_handle_t *handle, void *data, size_t *len)
{
uint32_t datalen = *len * sizeof(int16_t);
uint32_t datalen = (uint32_t)(*len * sizeof(int16_t));
size_t size;
switch_status_t status;
int16_t *xdata = data;

View File

@ -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>6031;4456;4024;4047;4324;6340;6246;6011;6387;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<DisableSpecificWarnings>4189;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>6031;4456;4024;4047;4324;6340;6246;6011;6387;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<DisableSpecificWarnings>4189;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>6031;4456;4024;4047;4324;6340;6246;6011;6387;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<DisableSpecificWarnings>4189;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>6031;4456;4024;4047;4324;6340;6246;6011;6387;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<DisableSpecificWarnings>4189;6031;4456;4024;4047;4324;6340;6246;6011;6387;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<EnablePREfast>false</EnablePREfast>
</ClCompile>
<Link>

View File

@ -73,6 +73,7 @@
<AdditionalIncludeDirectories>%(RootDir)%(Directory)..\..\..\..\libs\libdingaling\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PrecompiledHeader>
</PrecompiledHeader>
<DisableSpecificWarnings>4718;6340;6246;6011;6387;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile>
<Link>
<AdditionalOptions>/NODEFAULTLIB:LIMBCTD %(AdditionalOptions)</AdditionalOptions>
@ -90,6 +91,7 @@
<AdditionalIncludeDirectories>%(RootDir)%(Directory)..\..\..\..\libs\libdingaling\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PrecompiledHeader>
</PrecompiledHeader>
<DisableSpecificWarnings>4718;6340;6246;6011;6387;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile>
<Link>
<AdditionalOptions>/NODEFAULTLIB:LIMBCTD %(AdditionalOptions)</AdditionalOptions>
@ -105,6 +107,7 @@
<AdditionalIncludeDirectories>%(RootDir)%(Directory)..\..\..\..\libs\libdingaling\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PrecompiledHeader>
</PrecompiledHeader>
<DisableSpecificWarnings>4718;6340;6246;6011;6387;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile>
<Link>
<AdditionalLibraryDirectories>$(ProjectDir)..\..\..\..\libs\libdingaling\$(OutDir);$(ProjectDir)..\..\..\..\libs\iksemel\$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

View File

@ -72,6 +72,7 @@
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<DisableSpecificWarnings>4189;6340;6246;6011;6387;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile>
<Link>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
@ -86,6 +87,7 @@
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<DisableSpecificWarnings>4189;6340;6246;6011;6387;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile>
<Link>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
@ -98,6 +100,7 @@
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<DisableSpecificWarnings>4189;6340;6246;6011;6387;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile>
<Link>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
@ -112,6 +115,7 @@
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<DisableSpecificWarnings>4189;6340;6246;6011;6387;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile>
<Link>
<RandomizedBaseAddress>false</RandomizedBaseAddress>

View File

@ -27,6 +27,11 @@
#ifndef _RTMP_VIDEO_H
#define _RTMP_VIDEO_H
#include <assert.h>
#include <string.h>
#ifdef WIN32
#include <windows.h>
#endif
#include <openssl/hmac.h>
#include <openssl/sha.h>
@ -149,7 +154,7 @@ static void HMACsha256(const uint8_t *message, size_t messageLen, const uint8_t
unsigned int digestLen;
HMAC_CTX ctx;
HMAC_setup(ctx, key, keylen);
HMAC_setup(ctx, key, (int)keylen);
HMAC_crunch(ctx, message, messageLen);
HMAC_finish(ctx, digest, digestLen);
@ -603,7 +608,7 @@ static int ReadN(void * user_data, void * out_buffer, size_t size)
memcpy(out_buffer, helper->r_buf + helper->r_pos, len);
helper->r_pos += len;
return len;
return (int)len;
}
static int WriteN(void * user_data, void * buffer, size_t size)
@ -615,7 +620,7 @@ static int WriteN(void * user_data, void * buffer, size_t size)
memcpy(helper->w_buf + helper->w_pos, buffer, len);
helper->w_pos += len;
return len;
return (int)len;
}
static int SHandShake0(handshake_helper_t * r)

View File

@ -96,7 +96,7 @@
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;MOD_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PrecompiledHeader>
</PrecompiledHeader>
<DisableSpecificWarnings>4456;4221;4127;6001;6011;6385;6244;6259;4090;4306;4244;4100;4101;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<DisableSpecificWarnings>4189;4456;4221;4127;6001;6011;6385;6244;6259;4090;4306;4244;4100;4101;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<EnablePREfast>false</EnablePREfast>
</ClCompile>
<Link>
@ -114,7 +114,7 @@
<PreprocessorDefinitions>_DEBUG;_WINDOWS;_USRDLL;MOD_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PrecompiledHeader>
</PrecompiledHeader>
<DisableSpecificWarnings>4456;4221;4127;6001;6011;6385;6244;6259;4090;4306;4244;4100;4101;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<DisableSpecificWarnings>4189;4456;4221;4127;6001;6011;6385;6244;6259;4090;4306;4244;4100;4101;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<EnablePREfast>false</EnablePREfast>
</ClCompile>
<Link>
@ -132,7 +132,7 @@
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;MOD_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PrecompiledHeader>
</PrecompiledHeader>
<DisableSpecificWarnings>4456;4221;4127;6001;6011;6385;6244;6259;4090;4306;4244;4100;4101;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<DisableSpecificWarnings>4189;4456;4221;4127;6001;6011;6385;6244;6259;4090;4306;4244;4100;4101;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<EnablePREfast>false</EnablePREfast>
</ClCompile>
<Link>
@ -149,7 +149,7 @@
<PreprocessorDefinitions>NDEBUG;_WINDOWS;_USRDLL;MOD_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PrecompiledHeader>
</PrecompiledHeader>
<DisableSpecificWarnings>4456;4221;4127;6001;6011;6385;6244;6259;4090;4306;4244;4100;4101;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<DisableSpecificWarnings>4189;4456;4221;4127;6001;6011;6385;6244;6259;4090;4306;4244;4100;4101;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<EnablePREfast>false</EnablePREfast>
</ClCompile>
<Link>

View File

@ -75,7 +75,7 @@
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>false</TreatWarningAsError>
<DisableSpecificWarnings>4456;6031;4324;6340;6246;6011;6387;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<DisableSpecificWarnings>28252;28253;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>4456;6031;4324;6340;6246;6011;6387;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<DisableSpecificWarnings>28183;28252;28253;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>4456;6031;4324;6340;6246;6011;6387;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<DisableSpecificWarnings>28252;28253;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>4456;6031;4324;6340;6246;6011;6387;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<DisableSpecificWarnings>28252;28253;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>

View File

@ -67,7 +67,7 @@ int mcast_socket_create(const char *host, int16_t port, mcast_handle_t *handle,
family = AF_INET6;
}
if ((!(flags & MCAST_SEND) && !(flags & MCAST_RECV)) || (handle->sock = socket(family, SOCK_DGRAM, 0)) <= 0 ) {
if ((!(flags & MCAST_SEND) && !(flags & MCAST_RECV)) || (handle->sock = (int)socket(family, SOCK_DGRAM, 0)) <= 0 ) {
return -1;
}
@ -203,9 +203,9 @@ ssize_t mcast_socket_send(mcast_handle_t *handle, void *data, size_t datalen)
}
if (handle->family == AF_INET6) {
return sendto(handle->sock, data, datalen, 0, (struct sockaddr *) &handle->send_addr6, sizeof(handle->send_addr6));
return sendto(handle->sock, data, (int)datalen, 0, (struct sockaddr *) &handle->send_addr6, sizeof(handle->send_addr6));
} else {
return sendto(handle->sock, data, datalen, 0, (struct sockaddr *) &handle->send_addr, sizeof(handle->send_addr));
return sendto(handle->sock, data, (int)datalen, 0, (struct sockaddr *) &handle->send_addr, sizeof(handle->send_addr));
}
}
@ -227,8 +227,8 @@ ssize_t mcast_socket_recv(mcast_handle_t *handle, void *data, size_t datalen, in
}
if (handle->family == AF_INET6) {
return recvfrom(handle->sock, data, datalen, 0, (struct sockaddr *) &handle->recv_addr6, &addrlen);
return recvfrom(handle->sock, data, (int)datalen, 0, (struct sockaddr *) &handle->recv_addr6, &addrlen);
} else {
return recvfrom(handle->sock, data, datalen, 0, (struct sockaddr *) &handle->recv_addr, &addrlen);
return recvfrom(handle->sock, data, (int)datalen, 0, (struct sockaddr *) &handle->recv_addr, &addrlen);
}
}

View File

@ -55,7 +55,7 @@ int McastHandle::send(const char *data)
char *McastHandle::recv(int ms)
{
int r;
ssize_t r;
if ((r = mcast_socket_recv(&handle, NULL, 0, ms)) > 0) {
*((char *)handle.buffer + r) = '\0';

View File

@ -1416,7 +1416,7 @@ static uint8_t *http_stream_read(switch_stream_handle_t *handle, int *len)
return NULL;
}
*len = r->bytes_buffered - r->bytes_read;
*len = (int)(r->bytes_buffered - r->bytes_read);
if (*len > 0) { // we already read part of the body
uint8_t *data = (uint8_t *)wsh->buffer + r->bytes_read;
@ -1429,10 +1429,10 @@ static uint8_t *http_stream_read(switch_stream_handle_t *handle, int *len)
return NULL;
}
*len = r->content_length - (r->bytes_read - r->bytes_header);
*len = (int)(r->content_length - (r->bytes_read - r->bytes_header));
*len = *len > sizeof(wsh->buffer) ? sizeof(wsh->buffer) : *len;
if ((*len = ws_raw_read(wsh, wsh->buffer, *len, wsh->block)) < 0) {
if ((*len = (int)ws_raw_read(wsh, wsh->buffer, *len, wsh->block)) < 0) {
*len = 0;
return NULL;
}
@ -1464,7 +1464,7 @@ static switch_status_t http_stream_write(switch_stream_handle_t *handle, const c
if (data) {
if (ret) {
ret = ws_raw_write(&jsock->ws, data, (uint32_t)strlen(data));
ret =(int) ws_raw_write(&jsock->ws, data, (uint32_t)strlen(data));
}
switch_safe_free(data);
}
@ -1559,7 +1559,7 @@ new_req:
}
request.headers = stream.param_event;
if (switch_http_parse_header(jsock->ws.buffer, jsock->ws.datalen, &request) != SWITCH_STATUS_SUCCESS) {
if (switch_http_parse_header(jsock->ws.buffer, (uint32_t)jsock->ws.datalen, &request) != SWITCH_STATUS_SUCCESS) {
switch_event_destroy(&stream.param_event);
goto err;
}
@ -3995,7 +3995,7 @@ static void handle_mcast_sub(verto_profile_t *profile)
return;
}
bytes = mcast_socket_recv(&profile->mcast_sub, NULL, 0, 0);
bytes = (int)mcast_socket_recv(&profile->mcast_sub, NULL, 0, 0);
if (bytes > 0) {
cJSON *json;

View File

@ -395,7 +395,7 @@ static void event_handler(switch_event_t *event)
SWITCH_STANDARD_APP(socket_function)
{
char *host, *port_name, *path;
switch_socket_t *new_sock;
switch_socket_t *new_sock = NULL;
switch_sockaddr_t *sa;
switch_port_t port = 8084;
listener_t *listener;

View File

@ -1405,7 +1405,7 @@ SWIGINTERN int SWIG_Lua_class_tostring(lua_State* L)
/* there should be 1 param passed in
(1) userdata (not the metatable) */
assert(lua_isuserdata(L,1)); /* just in case */
unsigned long userData = (unsigned long)lua_touserdata(L,1); /* get the userdata address for later */
unsigned long userData = (unsigned long)(intptr_t)lua_touserdata(L,1); /* get the userdata address for later */
lua_getmetatable(L,1); /* get the meta table */
assert(lua_istable(L,-1)); /* just in case */

View File

@ -115,6 +115,7 @@ SWITCH_DECLARE(switch_status_t) switch_buffer_create_dynamic(switch_buffer_t **b
if (start_len) {
if (!(new_buffer->data = malloc(start_len))) {
free(new_buffer);
*buffer = NULL;
return SWITCH_STATUS_MEMERR;
}
memset(new_buffer->data, 0, start_len);
@ -130,7 +131,7 @@ SWITCH_DECLARE(switch_status_t) switch_buffer_create_dynamic(switch_buffer_t **b
*buffer = new_buffer;
return SWITCH_STATUS_SUCCESS;
}
*buffer = NULL;
return SWITCH_STATUS_MEMERR;
}
@ -268,6 +269,7 @@ SWITCH_DECLARE(switch_size_t) switch_buffer_peek_zerocopy(switch_buffer_t *buffe
if (buffer->used < 1) {
buffer->used = 0;
*ptr = NULL;
return 0;
} else {
reading = buffer->used;