]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-7966: fix more msvc 2015 warnings.
authorMike Jerris <mike@jerris.com>
Mon, 31 Aug 2015 21:08:52 +0000 (17:08 -0400)
committerMike Jerris <mike@jerris.com>
Mon, 31 Aug 2015 21:08:52 +0000 (17:08 -0400)
30 files changed:
libs/win32/ldns/ldns-lib/ldns-lib.2015.vcxproj
libs/win32/libcbt/libcbt.2015.vcxproj
libs/win32/opus/opus.celt.2015.vcxproj
libs/win32/opus/opus.silk_common.2015.vcxproj
libs/win32/opus/opus.silk_fixed.2015.vcxproj
libs/win32/opus/opus.silk_float.2015.vcxproj
libs/win32/portaudio/portaudio.2015.vcxproj
src/mod/applications/mod_callcenter/mod_callcenter.c
src/mod/applications/mod_distributor/mod_distributor.c
src/mod/applications/mod_dptools/mod_dptools.c
src/mod/applications/mod_expr/mod_expr.2015.vcxproj
src/mod/applications/mod_fifo/mod_fifo.c
src/mod/applications/mod_hash/mod_hash.c
src/mod/applications/mod_httapi/mod_httapi.c
src/mod/applications/mod_nibblebill/mod_nibblebill.c
src/mod/applications/mod_redis/mod_redis.2015.vcxproj
src/mod/dialplans/mod_dialplan_asterisk/mod_dialplan_asterisk.c
src/mod/endpoints/mod_dingaling/mod_dingaling.c
src/mod/endpoints/mod_gsmopen/gsmlib/gsmlib-1.10-patched-13ubuntu/win32/gsmlib.2015.vcxproj
src/mod/endpoints/mod_loopback/mod_loopback.c
src/mod/endpoints/mod_rtmp/rtmp.c
src/mod/endpoints/mod_sofia/mod_sofia.c
src/mod/endpoints/mod_sofia/sofia_presence.c
src/mod/endpoints/mod_sofia/sofia_reg.c
src/mod/endpoints/mod_verto/mcast/mcast.c
src/mod/endpoints/mod_verto/mod_verto.2015.vcxproj
src/mod/endpoints/mod_verto/mod_verto.c
src/mod/event_handlers/mod_event_socket/mod_event_socket.c
src/mod/formats/mod_local_stream/mod_local_stream.c
src/switch_core_codec.c

index 316b6fbb1506eeecc37360f2e9c951868bf3927b..1db946397dfe61268f80f87a9fe86f57e57f8b54 100644 (file)
@@ -90,7 +90,7 @@
       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r
       <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
       <WarningLevel>Level3</WarningLevel>\r
-      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>\r
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
       <DisableSpecificWarnings>4013;4101;4996;4267;4244;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
     </ClCompile>\r
     <PreBuildEvent>\r
index 1f6f67d5c05fb409e6484e133336ad65cb8338a6..1f79443e5dd2b2da2a8920b824d831bf62c1c9e8 100644 (file)
@@ -91,6 +91,7 @@
       <SDLCheck>true</SDLCheck>\r
       <AdditionalIncludeDirectories>$(SolutionDir)src\mod\endpoints\mod_gsmopen\libctb-0.16\include</AdditionalIncludeDirectories>\r
       <DisableSpecificWarnings>4311;4302;4800;4101;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
     </ClCompile>\r
     <Link>\r
       <SubSystem>Windows</SubSystem>\r
index d799646d40d43ea946464bb39abe7eac6a2c7395..624f6c1d8756e3749db330f53648c300e4cf1f48 100644 (file)
@@ -97,6 +97,7 @@
       <PreprocessorDefinitions>HAVE_CONFIG_H;WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
       <AdditionalIncludeDirectories>..\..\opus-1.1\win32;..\..\opus-1.1\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
       <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
     </ClCompile>\r
     <Link>\r
       <SubSystem>Windows</SubSystem>\r
       <PreprocessorDefinitions>HAVE_CONFIG_H;WIN32;WIN64;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
       <AdditionalIncludeDirectories>..\..\opus-1.1\win32;..\..\opus-1.1\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
       <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
     </ClCompile>\r
     <Link>\r
       <SubSystem>Windows</SubSystem>\r
index 102f81bc92ea237eb76380cc954b687b7b632a4b..23c9fbc5157da62abf07b45fdac9a6c8ab9e5f8a 100644 (file)
@@ -94,6 +94,7 @@
       <PreprocessorDefinitions>HAVE_CONFIG_H;WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
       <AdditionalIncludeDirectories>..\..\opus-1.1\silk\fixed;..\..\opus-1.1\silk\float;..\..\opus-1.1\win32;..\..\opus-1.1\celt;..\..\opus-1.1\include</AdditionalIncludeDirectories>\r
       <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
     </ClCompile>\r
     <Link>\r
       <SubSystem>Windows</SubSystem>\r
       <PreprocessorDefinitions>HAVE_CONFIG_H;WIN32;WIN64;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
       <AdditionalIncludeDirectories>..\..\opus-1.1\silk\fixed;..\..\opus-1.1\silk\float;..\..\opus-1.1\win32;..\..\opus-1.1\celt;..\..\opus-1.1\include</AdditionalIncludeDirectories>\r
       <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
     </ClCompile>\r
     <Link>\r
       <SubSystem>Windows</SubSystem>\r
index 7a2518c4285ef1913686130dfbba7f666937b18c..a1f416eb44dfcc90edcc3aabf2faa5228ad5d9cc 100644 (file)
@@ -93,6 +93,7 @@
       <AdditionalIncludeDirectories>..\..\opus-1.1\silk\;..\..\opus-1.1\win32;..\..\opus-1.1\celt;..\..\opus-1.1\include</AdditionalIncludeDirectories>\r
       <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
       <DisableSpecificWarnings>4244;4133;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
     </ClCompile>\r
     <Link>\r
       <SubSystem>Windows</SubSystem>\r
       <AdditionalIncludeDirectories>..\..\opus-1.1\silk\;..\..\opus-1.1\win32;..\..\opus-1.1\celt;..\..\opus-1.1\include</AdditionalIncludeDirectories>\r
       <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
       <DisableSpecificWarnings>4244;4133;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
     </ClCompile>\r
     <Link>\r
       <SubSystem>Windows</SubSystem>\r
index ead5c148894b7fe29c46043187e5148751ee392c..52268b88f2f035d28e6bcf80045cb3e017322c13 100644 (file)
@@ -93,6 +93,7 @@
       <PreprocessorDefinitions>HAVE_CONFIG_H;WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
       <AdditionalIncludeDirectories>..\..\opus-1.1\silk;..\..\opus-1.1\silk\fixed;..\..\opus-1.1\win32;..\..\opus-1.1\celt;..\..\opus-1.1\include</AdditionalIncludeDirectories>\r
       <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
     </ClCompile>\r
     <Link>\r
       <SubSystem>Windows</SubSystem>\r
       <PreprocessorDefinitions>HAVE_CONFIG_H;WIN32;WIN64;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
       <AdditionalIncludeDirectories>..\..\opus-1.1\silk;..\..\opus-1.1\silk\fixed;..\..\opus-1.1\win32;..\..\opus-1.1\celt;..\..\opus-1.1\include</AdditionalIncludeDirectories>\r
       <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
     </ClCompile>\r
     <Link>\r
       <SubSystem>Windows</SubSystem>\r
index 22f74ecbfa9b4ea3a9520edeb89a52d428175f9c..8c33f0486571be924f5244b7533086fd68638dc0 100644 (file)
       <FunctionLevelLinking>true</FunctionLevelLinking>\r
       <WarningLevel>Level3</WarningLevel>\r
       <SuppressStartupBanner>true</SuppressStartupBanner>\r
-      <DisableSpecificWarnings>4496;4312;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
+      <DisableSpecificWarnings>4996;4312;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
     </ClCompile>\r
     <ResourceCompile>\r
       <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
       <FunctionLevelLinking>true</FunctionLevelLinking>\r
       <WarningLevel>Level3</WarningLevel>\r
       <SuppressStartupBanner>true</SuppressStartupBanner>\r
-      <DisableSpecificWarnings>4496;4312;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
+      <DisableSpecificWarnings>4996;4312;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
     </ClCompile>\r
     <ResourceCompile>\r
       <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
       <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
       <WarningLevel>Level3</WarningLevel>\r
       <SuppressStartupBanner>true</SuppressStartupBanner>\r
-      <DisableSpecificWarnings>4496;4312;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
+      <DisableSpecificWarnings>4996;4312;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
     </ClCompile>\r
     <ResourceCompile>\r
       <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
       <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
       <WarningLevel>Level3</WarningLevel>\r
       <SuppressStartupBanner>true</SuppressStartupBanner>\r
-      <DisableSpecificWarnings>4496;4312;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
+      <DisableSpecificWarnings>4996;4312;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
     </ClCompile>\r
     <ResourceCompile>\r
       <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
       <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
       <WarningLevel>Level3</WarningLevel>\r
       <SuppressStartupBanner>true</SuppressStartupBanner>\r
-      <DisableSpecificWarnings>4496;4312;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
+      <DisableSpecificWarnings>4996;4312;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
     </ClCompile>\r
     <ResourceCompile>\r
       <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
       <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
       <WarningLevel>Level3</WarningLevel>\r
       <SuppressStartupBanner>true</SuppressStartupBanner>\r
-      <DisableSpecificWarnings>4496;4312;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
+      <DisableSpecificWarnings>4996;4312;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
     </ClCompile>\r
     <ResourceCompile>\r
       <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
       <FunctionLevelLinking>true</FunctionLevelLinking>\r
       <WarningLevel>Level3</WarningLevel>\r
       <SuppressStartupBanner>true</SuppressStartupBanner>\r
-      <DisableSpecificWarnings>4496;4312;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
+      <DisableSpecificWarnings>4996;4312;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
     </ClCompile>\r
     <ResourceCompile>\r
       <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
       <FunctionLevelLinking>true</FunctionLevelLinking>\r
       <WarningLevel>Level3</WarningLevel>\r
       <SuppressStartupBanner>true</SuppressStartupBanner>\r
-      <DisableSpecificWarnings>4496;4312;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
+      <DisableSpecificWarnings>4996;4312;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
     </ClCompile>\r
     <ResourceCompile>\r
       <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
index c9681993b04c3bd6a03d5f4e41bf0e48bf2f52c2..594908dd4d4b949e4bbe747ca10b8577bb3ac571 100644 (file)
@@ -1598,7 +1598,7 @@ static void *SWITCH_THREAD_FUNC outbound_agent_thread_run(switch_thread_t *threa
                agent_session = switch_core_session_locate(h->agent_uuid);
                if (agent_session) {
                        switch_channel_t *agent_channel = switch_core_session_get_channel(agent_session);
-                       switch_event_t *event;
+                       switch_event_t *e;
                        const char *cc_warning_tone = switch_channel_get_variable(agent_channel, "cc_warning_tone");
 
                        switch_channel_set_variable(agent_channel, "cc_side", "agent");
@@ -1609,11 +1609,11 @@ static void *SWITCH_THREAD_FUNC outbound_agent_thread_run(switch_thread_t *threa
                        switch_channel_set_variable(agent_channel, "cc_member_session_uuid", h->member_session_uuid);
 
                        /* Playback this to the agent */
-                       if (cc_warning_tone && switch_event_create(&event, SWITCH_EVENT_COMMAND) == SWITCH_STATUS_SUCCESS) {
-                               switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "call-command", "execute");
-                               switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "execute-app-name", "playback");
-                               switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "execute-app-arg", cc_warning_tone);
-                               switch_core_session_queue_private_event(agent_session, &event, SWITCH_TRUE);
+                       if (cc_warning_tone && switch_event_create(&e, SWITCH_EVENT_COMMAND) == SWITCH_STATUS_SUCCESS) {
+                               switch_event_add_header_string(e, SWITCH_STACK_BOTTOM, "call-command", "execute");
+                               switch_event_add_header_string(e, SWITCH_STACK_BOTTOM, "execute-app-name", "playback");
+                               switch_event_add_header_string(e, SWITCH_STACK_BOTTOM, "execute-app-arg", cc_warning_tone);
+                               switch_core_session_queue_private_event(agent_session, &e, SWITCH_TRUE);
                        }
 
                        status = SWITCH_STATUS_SUCCESS;
index feef88734514514dfccb2f95218fc45e3baf7341..7b1ae3790eb0b33a8df54fdce812626616b57724 100644 (file)
@@ -161,7 +161,7 @@ static int load_config(int reloading)
                lp = new_list;
 
                for (param = switch_xml_child(list, "node"); param; param = param->next) {
-                       char *name = (char *) switch_xml_attr_soft(param, "name");
+                       char *name_attr = (char *) switch_xml_attr_soft(param, "name");
                        char *weight_val = (char *) switch_xml_attr_soft(param, "weight");
                        int tmp;
 
@@ -171,7 +171,7 @@ static int load_config(int reloading)
                        }
 
                        switch_zmalloc(node, sizeof(*node));
-                       node->name = strdup(name);
+                       node->name = strdup(name_attr);
                        node->wval = tmp;
                        
                        if (np) {
index f174f2cd042a4077ef05404306ea977b4dcef20c..8cc294734346d5f73eb5feeec2db32a802dffae8 100644 (file)
@@ -3840,11 +3840,11 @@ SWITCH_STANDARD_APP(pickup_function)
                        caller_profile->callee_id_number = num;
                        
                        if (switch_event_create(&event, SWITCH_EVENT_CALL_UPDATE) == SWITCH_STATUS_SUCCESS) {
-                               const char *uuid = switch_channel_get_partner_uuid(channel);
+                               const char *partner_uuid = switch_channel_get_partner_uuid(channel);
                                switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Direction", "RECV");
                                
-                               if (uuid) {
-                                       switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Bridged-To", uuid);
+                               if (partner_uuid) {
+                                       switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Bridged-To", partner_uuid);
                                }
                                switch_channel_event_set_data(channel, event);
                                switch_event_fire(&event);
@@ -4700,17 +4700,17 @@ static switch_status_t next_file(switch_file_handle_t *handle)
                if (context->file && switch_test_flag(handle, SWITCH_FILE_DATA_SHORT)) { /* TODO handle other data type flags */
                        switch_size_t len;                      
                        uint16_t buf[SWITCH_RECOMMENDED_BUFFER_SIZE] = { 0 };
-                       switch_status_t status;
+                       switch_status_t stat;
                        switch_file_handle_t fh = { 0 };
 
-                       if ((status = switch_core_file_open(&fh, context->file, handle->channels, handle->samplerate, 
+                       if ((stat = switch_core_file_open(&fh, context->file, handle->channels, handle->samplerate, 
                                                                                                SWITCH_FILE_FLAG_READ | SWITCH_FILE_DATA_SHORT, NULL)) == SWITCH_STATUS_SUCCESS) {
                                        do {
                                                len = SWITCH_RECOMMENDED_BUFFER_SIZE / handle->channels;
-                                               if ((status = switch_core_file_read(&fh, buf, &len)) == SWITCH_STATUS_SUCCESS) {
-                                                       status = switch_core_file_write(&context->fh, buf, &len);
+                                               if ((stat = switch_core_file_read(&fh, buf, &len)) == SWITCH_STATUS_SUCCESS) {
+                                                       stat = switch_core_file_write(&context->fh, buf, &len);
                                                }
-                                       } while (status == SWITCH_STATUS_SUCCESS);
+                                       } while (stat == SWITCH_STATUS_SUCCESS);
 
                                        switch_core_file_close(&fh);                            
                                        switch_file_remove(context->file, handle->memory_pool);
@@ -5628,10 +5628,10 @@ SWITCH_STANDARD_APP(page_function)
        }
 
        if ((l = switch_channel_get_variable(channel, "page_chunk_size"))) {
-               uint32_t tmp = switch_atoui(l);
+               uint32_t chunk = switch_atoui(l);
 
-               if (tmp > 0) {
-                       chunk_size = tmp;
+               if (chunk > 0) {
+                       chunk_size = chunk;
                }
        }
 
index d2addb9aa1aed96652545acfe1e420ade9029ddc..462c474894b7ba9377863cc1fc169714e44cbc7c 100644 (file)
@@ -73,7 +73,7 @@
       <AdditionalOptions> /J</AdditionalOptions>\r
       <PrecompiledHeader>\r
       </PrecompiledHeader>\r
-      <DisableSpecificWarnings>4100;4701;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
+      <DisableSpecificWarnings>6031;4100;4701;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
     </ClCompile>\r
     <Link>\r
       <RandomizedBaseAddress>false</RandomizedBaseAddress>\r
@@ -89,7 +89,7 @@
       <AdditionalOptions> /J</AdditionalOptions>\r
       <PrecompiledHeader>\r
       </PrecompiledHeader>\r
-      <DisableSpecificWarnings>4100;4701;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
+      <DisableSpecificWarnings>6031;4100;4701;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
     </ClCompile>\r
     <Link>\r
       <RandomizedBaseAddress>false</RandomizedBaseAddress>\r
       <AdditionalOptions> /J</AdditionalOptions>\r
       <PrecompiledHeader>\r
       </PrecompiledHeader>\r
-      <DisableSpecificWarnings>4100;4701;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
+      <DisableSpecificWarnings>6031;4100;4701;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
     </ClCompile>\r
     <Link>\r
       <RandomizedBaseAddress>false</RandomizedBaseAddress>\r
       <AdditionalOptions> /J</AdditionalOptions>\r
       <PrecompiledHeader>\r
       </PrecompiledHeader>\r
-      <DisableSpecificWarnings>4100;4701;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
+      <DisableSpecificWarnings>6031;4100;4701;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
     </ClCompile>\r
     <Link>\r
       <RandomizedBaseAddress>false</RandomizedBaseAddress>\r
index d6877ef8dc0e3dd5720781a2deccb255b1fa573a..cda0386eb6651abf6358056cc197ca653e47a7f7 100644 (file)
@@ -3677,7 +3677,7 @@ static int xml_callback(void *pArg, int argc, char **argv, char **columnNames)
        struct xml_helper *h = (struct xml_helper *) pArg;
        switch_xml_t x_out;
        int c_off = 0;
-       char exp_buf[128] = "";
+       char exp_buf[128] = { 0 };
        switch_time_exp_t tm;
        switch_time_t etime = 0;
        char atime[128] = "";
index 2ab9e0ae7decc0c97d6f6a58c94f0795a5cfcdd4..a7c2cb6aee63c437922a793c1347775e8d90ddfa 100644 (file)
@@ -289,7 +289,6 @@ SWITCH_LIMIT_RELEASE(limit_release_hash)
                        void *val = NULL;
                        const void *key;
                        switch_ssize_t keylen;
-                       limit_hash_item_t *item = NULL;
 
                        switch_core_hash_this(hi, &key, &keylen, &val);
 
index 844f1707dd398549389c10500aaf46f706a8cbb5..93a70972f8c845f038abcd7ffaadead678bba3c7 100644 (file)
@@ -2437,7 +2437,7 @@ static size_t save_file_callback(void *ptr, size_t size, size_t nmemb, void *dat
                } else {
                        switch_cond_next();
                }
-       } while (wrote != realsize && (x == -1 && (errno == EAGAIN || errno == EINTR)) && --sanity);
+       } while ((unsigned)wrote != realsize && (x == -1 && (errno == EAGAIN || errno == EINTR)) && --sanity);
 
        if (wrote != (int) realsize) {
                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Short write! fd:%d %d out of %d [%s]\n", client->fd, wrote, realsize, strerror(errno));
index f6d1b51ed9cce93fa4a27e0f801382ef3387108d..d6257ddb4a880e838f8c9a33cc9e3c63cf411a0f 100644 (file)
@@ -609,7 +609,7 @@ static switch_status_t do_billing(switch_core_session_t *session)
                        /* we're going to make an assumption that final billing is done here. So we'll see how this goes. */
                        /* round total billed up as required */
 
-                       rounded_billed = ceilf(nibble_data->total * rounding_factor) / rounding_factor;
+                       rounded_billed = ceilf((float)(nibble_data->total * rounding_factor)) / rounding_factor;
 
                        if (rounded_billed < minimum_charge)
                        {
index bfb8f9739efb5bf296ee37c52e6556eb5948ceaf..442bba76340a50deb094e8064e554d769982a746 100644 (file)
   </ItemDefinitionGroup>\r
   <ItemGroup>\r
     <ClCompile Include="mod_redis.c" />\r
-    <ClCompile Include="credis.c" />\r
+    <ClCompile Include="credis.c">\r
+      <DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4005;4389;4133;4244;4706;4306;4996;6340;6246;6011;6387;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
+      <DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4005;4389;4133;4244;4706;4306;4996;6340;6246;6011;6387;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
+      <DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">4005;4389;4133;4244;4706;4306;4996;6340;6246;6011;6387;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
+      <DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|x64'">4005;4389;4133;4244;4706;4306;4996;6340;6246;6011;6387;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
+    </ClCompile>\r
   </ItemGroup>\r
   <ItemGroup>\r
     <ProjectReference Include="..\..\..\..\w32\Library\FreeSwitchCore.2015.vcxproj">\r
index 199616866311be91296d40566a45a7569a80c03f..0384e7af3e8c3522a0b8c54cb6b8379ed9cc157d 100644 (file)
@@ -166,7 +166,7 @@ SWITCH_STANDARD_DIALPLAN(asterisk_dialplan_hunt)
                                char *pattern = NULL;
                                char *app = NULL;
                                char *argument = NULL;
-                               char *expression = NULL, expression_buf[1024] = "";
+                               char *expression = NULL, expression_buf[1024] = { 0 };
                                char substituted[2048] = "";
                                const char *field_data = caller_profile->destination_number;
                                int proceed = 0;
index e92ea57c1cf9581a1c5f1eb261319d3e3263846a..9ab1c072f568f752a10e059a9aa1f598c52ed941 100644 (file)
@@ -4018,7 +4018,6 @@ static ldl_status handle_signalling(ldl_handle_t *handle, ldl_session_t *dlsessi
                                char *proto = MDL_CHAT_PROTO;
                                char *pproto = NULL, *ffrom = NULL;
                                char *hint;
-                               switch_event_t *event;
                                char *from_user, *from_host;
 #ifdef AUTO_REPLY
                                if (profile->auto_reply) {
index 34061747e32b7e2087006e9e4331210de1991d9a..dd468b6f13613ceeff915fdf3145c3262e672a48 100644 (file)
       <RuntimeTypeInfo>true</RuntimeTypeInfo>\r
       <WarningLevel>Level3</WarningLevel>\r
       <SuppressStartupBanner>true</SuppressStartupBanner>\r
-      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>\r
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
       <AdditionalOptions>/wd4290 /wd4996 %(AdditionalOptions)</AdditionalOptions>\r
       <DisableSpecificWarnings>4838;4267;4101;4244;4554;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
     </ClCompile>\r
index 7f8d7a6284f1cbbd50fa407cf95e0519ee8aa9ad..4bcd0c7d3e52678f755e2de7b1c4458dca28f4c1 100644 (file)
@@ -137,12 +137,12 @@ static switch_status_t tech_init(loopback_private_t *tech_pvt, switch_core_sessi
                interval = codec->implementation->microseconds_per_packet / 1000;
        } else {
                const char *var;
-               char *modname = NULL;
+               char *codec_modname = NULL;
 
                if ((var = switch_channel_get_variable(channel, "loopback_initial_codec"))) {
                        char *dup = switch_core_session_strdup(session, var);
                        uint32_t bit, channels;
-                       iananame = switch_parse_codec_buf(dup, &interval, &rate, &bit, &channels, &modname);
+                       iananame = switch_parse_codec_buf(dup, &interval, &rate, &bit, &channels, &codec_modname);
                }
                
        }
index 75a8b6d5c23485201f4c59ad8e01f43f9701ac95..8c132634e768a6f8bf0f71271f2201e6ffbbeea2 100644 (file)
@@ -1016,7 +1016,7 @@ switch_status_t rtmp_handle_data(rtmp_session_t *rsession)
 
 
                                                                switch_mutex_lock(rsession->tech_pvt->readbuf_mutex);
-                                                               if (rsession->tech_pvt->maxlen && switch_buffer_inuse(rsession->tech_pvt->readbuf) > rsession->tech_pvt->maxlen * 40) {
+                                                               if (rsession->tech_pvt->maxlen && switch_buffer_inuse(rsession->tech_pvt->readbuf) > (switch_size_t)(rsession->tech_pvt->maxlen * 40)) {
                                                                        rsession->tech_pvt->over_size++;
                                                                } else {
                                                                        rsession->tech_pvt->over_size = 0;
@@ -1057,7 +1057,7 @@ switch_status_t rtmp_handle_data(rtmp_session_t *rsession)
                                                                }
 
                                                                switch_mutex_lock(rsession->tech_pvt->video_readbuf_mutex);
-                                                               if (rsession->tech_pvt->video_maxlen && switch_buffer_inuse(rsession->tech_pvt->video_readbuf) > rsession->tech_pvt->video_maxlen * 100) {
+                                                               if (rsession->tech_pvt->video_maxlen && switch_buffer_inuse(rsession->tech_pvt->video_readbuf) > (switch_size_t)(rsession->tech_pvt->video_maxlen * 100)) {
                                                                        rsession->tech_pvt->video_over_size++;
                                                                } else {
                                                                        rsession->tech_pvt->video_over_size = 0;
index 0d94ccff6e5dc0f1b093d9f42e9e01c6f48cada2..29281d0cd6a1261ed200d06d4726d60793629c26 100644 (file)
@@ -94,7 +94,7 @@ static switch_status_t sofia_on_init(switch_core_session_t *session)
                char *dupvar = NULL;
                char *watch_headers[10];
                unsigned int numhdrs = 0;
-               int i = 0;
+               unsigned int i = 0;
                dupvar = switch_core_session_strdup(session, hval);
                numhdrs = switch_separate_string(dupvar, ',', watch_headers, switch_arraylen(watch_headers));
                if (numhdrs) {
index d7255e8bfc528cf4951ef2bf6c6eeac88c00c63f..da09c3006965d301dc77c60c0d7dd1c0a220527e 100644 (file)
@@ -2111,7 +2111,7 @@ static uint32_t check_presence_epoch(void)
 {
        struct tm tm = {0};
        time_t now = switch_epoch_time_now(NULL);
-       uint32_t callsequence = (now - mod_sofia_globals.presence_epoch) * SOFIA_PRESENCE_COLLISION_DELTA;
+       uint32_t callsequence = (uint32_t)((now - mod_sofia_globals.presence_epoch) * SOFIA_PRESENCE_COLLISION_DELTA);
 
        if (!mod_sofia_globals.presence_year || callsequence >= SOFIA_PRESENCE_ROLLOVER_YEAR) {
                switch_mutex_lock(mod_sofia_globals.mutex);
@@ -2120,7 +2120,7 @@ static uint32_t check_presence_epoch(void)
                if (tm.tm_year != mod_sofia_globals.presence_year) {
                        mod_sofia_globals.presence_epoch = (uint32_t)now - (tm.tm_yday * 86400) - (tm.tm_hour * 60 * 60) - (tm.tm_min * 60) - tm.tm_sec;
                        mod_sofia_globals.presence_year = tm.tm_year;
-                       callsequence = ((uint32_t)now - mod_sofia_globals.presence_epoch) * SOFIA_PRESENCE_COLLISION_DELTA;
+                       callsequence = (uint32_t)(((uint32_t)now - mod_sofia_globals.presence_epoch) * SOFIA_PRESENCE_COLLISION_DELTA);
                }
 
                switch_mutex_unlock(mod_sofia_globals.mutex);
index df238245b47c9c6ab4a017638e43af19ba860179..d6d7b87dfa798c92a26b560ad11550146d24cd07 100644 (file)
@@ -857,7 +857,7 @@ long sofia_reg_uniform_distribution(int max)
        int result;
        int range = max + 1;
 
-       srand((intptr_t) switch_thread_self() + switch_micro_time_now());
+       srand((unsigned)((intptr_t) switch_thread_self() + switch_micro_time_now()));
        result = (int)((double)rand() / (((double)RAND_MAX + (double)1) / range));
 
        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG9, "Generated random %ld, max is %d\n", (long) result, max);
@@ -2748,7 +2748,7 @@ auth_res_t sofia_reg_parse_auth(sofia_profile_t *profile,
                free(sql);
 
                //if (!sofia_glue_execute_sql2str(profile, profile->dbh_mutex, sql, np, nplen)) {
-               if (zstr(np) || (profile->max_auth_validity != 0 && cb.last_nc >= profile->max_auth_validity )) {
+               if (zstr(np) || (profile->max_auth_validity != 0 && (uint32_t)cb.last_nc >= profile->max_auth_validity )) {
                        sql = switch_mprintf("delete from sip_authentication where nonce='%q'", nonce);
                        sofia_glue_execute_sql(profile, &sql, SWITCH_TRUE);
                        ret = AUTH_STALE;
index 1e480d0654c3ea7c470abfc0327b1ea2cf4e21c1..9da4088ccd50087dd6270471792251be7f3ae079 100644 (file)
@@ -136,7 +136,7 @@ int mcast_socket_create(const char *host, int16_t port, mcast_handle_t *handle,
                        memcpy(&mreq.ipv6mr_multiaddr, &((struct sockaddr_in6 *)mcast_addr->ai_addr)->sin6_addr,  sizeof(struct in6_addr));
                                                                                         
                        mreq.ipv6mr_interface = 0;
-                       setsockopt(handle->sock, IPPROTO_IPV6, IPV6_JOIN_GROUP, &mreq, sizeof(mreq));
+                       setsockopt(handle->sock, IPPROTO_IPV6, IPV6_JOIN_GROUP, (const char *)&mreq, sizeof(mreq));
 
                        if (bind(handle->sock, (struct sockaddr *) &handle->recv_addr6, sizeof(handle->recv_addr6)) < 0) {
                                printf("FUCK (%s) %s\n", host, strerror(errno));
index e71f52a081f7068472d6bada5179605904c3416b..55a56c62bc19003ea6ea2ab6eed202481685d035 100644 (file)
@@ -78,7 +78,7 @@
       </PrecompiledHeader>\r
       <AdditionalIncludeDirectories>$(SolutionDir)\src\include;%(AdditionalIncludeDirectories);..\..\..\..\libs\openssl-$(OpenSSLVersion)\include;$(ProjectDir)..\..\..\..\libs\pthreads-w32-2-9-1;.\;.\mcast</AdditionalIncludeDirectories>\r
       <PreprocessorDefinitions>_TIMESPEC_DEFINED;_DEBUG;DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <DisableSpecificWarnings>6031;6340;6246;6011;6387;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
+      <DisableSpecificWarnings>6053;6031;6340;6246;6011;6387;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
     </ClCompile>\r
     <Link>\r
       <RandomizedBaseAddress>false</RandomizedBaseAddress>\r
@@ -95,7 +95,7 @@
       </PrecompiledHeader>\r
       <AdditionalIncludeDirectories>$(SolutionDir)\src\include;%(AdditionalIncludeDirectories);..\..\..\..\libs\openssl-$(OpenSSLVersion)\include;$(ProjectDir)..\..\..\..\libs\pthreads-w32-2-9-1;.\;.\mcast</AdditionalIncludeDirectories>\r
       <PreprocessorDefinitions>_TIMESPEC_DEFINED;_DEBUG;DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <DisableSpecificWarnings>6031;6340;6246;6011;6387;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
+      <DisableSpecificWarnings>6053;6031;6340;6246;6011;6387;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
     </ClCompile>\r
     <Link>\r
       <RandomizedBaseAddress>false</RandomizedBaseAddress>\r
       </PrecompiledHeader>\r
       <AdditionalIncludeDirectories>$(SolutionDir)\src\include;%(AdditionalIncludeDirectories);..\..\..\..\libs\openssl-$(OpenSSLVersion)\include;$(ProjectDir)..\..\..\..\libs\pthreads-w32-2-9-1;.\;.\mcast</AdditionalIncludeDirectories>\r
       <PreprocessorDefinitions>_TIMESPEC_DEFINED;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <DisableSpecificWarnings>6031;6340;6246;6011;6387;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
+      <DisableSpecificWarnings>6053;6031;6340;6246;6011;6387;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
     </ClCompile>\r
     <Link>\r
       <RandomizedBaseAddress>false</RandomizedBaseAddress>\r
       </PrecompiledHeader>\r
       <AdditionalIncludeDirectories>$(SolutionDir)\src\include;%(AdditionalIncludeDirectories);..\..\..\..\libs\openssl-$(OpenSSLVersion)\include;$(ProjectDir)..\..\..\..\libs\pthreads-w32-2-9-1;.\;.\mcast</AdditionalIncludeDirectories>\r
       <PreprocessorDefinitions>_TIMESPEC_DEFINED;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <DisableSpecificWarnings>6031;6340;6246;6011;6387;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
+      <DisableSpecificWarnings>6053;6031;6340;6246;6011;6387;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
     </ClCompile>\r
     <Link>\r
       <RandomizedBaseAddress>false</RandomizedBaseAddress>\r
index 3834a24ba86ffa03a7d481adf8976159818a1544..3781d4728511b3abcb5148dad95aeac6e68715b3 100644 (file)
@@ -1100,6 +1100,8 @@ static void attach_jsock(jsock_t *jsock)
 
        switch_mutex_lock(globals.jsock_mutex);
 
+       switch_assert(jsock);
+
        if ((jp = switch_core_hash_find(globals.jsock_hash, jsock->uuid_str))) {
                if (jp == jsock) {
                        proceed = 0;
@@ -1543,7 +1545,7 @@ static void http_run(jsock_t *jsock)
 {
        switch_http_request_t request = { 0 };
        switch_stream_handle_t stream = { 0 };
-       char *data = NULL;
+       char *err = NULL;
        char *ext;
        verto_vhost_t *vhost;
        switch_bool_t keepalive;
@@ -1600,7 +1602,7 @@ new_req:
                        memcpy(buffer, jsock->ws.buffer + request.bytes_read, bytes);
                }
 
-               while(bytes < request.content_length) {
+               while(bytes < (switch_ssize_t)request.content_length) {
                        len = request.content_length - bytes;
 
                        if ((len = ws_raw_read(&jsock->ws, buffer + bytes, len, jsock->ws.block)) < 0) {
@@ -1793,9 +1795,9 @@ request_err:
        switch_http_free_request(&request);
 
 err:
-       data = "HTTP/1.1 500 Internal Server Error\r\n"
+       err = "HTTP/1.1 500 Internal Server Error\r\n"
                "Content-Length: 0\r\n\r\n";
-       ws_raw_write(&jsock->ws, data, strlen(data));
+       ws_raw_write(&jsock->ws, err, strlen(err));
 
 error:
        return;
@@ -5072,7 +5074,6 @@ static int verto_send_chat(const char *uid, const char *call_id, cJSON *msg)
                switch_core_session_t *session;
                if ((session = switch_core_session_locate(call_id))) {
                        verto_pvt_t *tech_pvt = switch_core_session_get_private_class(session, SWITCH_PVT_SECONDARY);
-                       jsock_t *jsock;
 
                        if ((jsock = get_jsock(tech_pvt->jsock_uuid))) {
                                jsock_queue_event(jsock, &msg, SWITCH_FALSE);
index 3c8683ed4c0d8a4d5c43746cd7dafc1e50f383f1..66f8e6cbb23f880be23fd60270b26f1319c2bf95 100644 (file)
@@ -399,7 +399,7 @@ SWITCH_STANDARD_APP(socket_function)
        switch_sockaddr_t *sa;
        switch_port_t port = 8084;
        listener_t *listener;
-       int argc = 0, x = 0;
+       unsigned int argc = 0, x = 0;
        char *argv[80] = { 0 };
        char *hosts[50] = { 0 };
        unsigned int hosts_count = 0;
index 3b6bed2fdd288b4d0e1b97bbc36c20e5cf400c49..9c9eedd8dd4f6d38d2f8998d38c6f609b003c23a 100644 (file)
@@ -226,10 +226,10 @@ static void *SWITCH_THREAD_FUNC read_stream_thread(switch_thread_t *thread, void
                        const char *artist = NULL, *title = NULL;
 
                        if (fd > -1) {
-                               char *p;
+                               char *pb;
                                if (switch_fd_read_line(fd, path_buf, sizeof(path_buf))) {
-                                       if ((p = strchr(path_buf, '\r')) || (p = strchr(path_buf, '\n'))) {
-                                               *p = '\0';
+                                       if ((pb = strchr(path_buf, '\r')) || (pb = strchr(path_buf, '\n'))) {
+                                               *pb = '\0';
                                        }
                                } else {
                                        close(fd);
@@ -1011,9 +1011,9 @@ static int launch_streams(const char *name)
 
        if (zstr(name)) {
                for (directory = switch_xml_child(cfg, "directory"); directory; directory = directory->next) {
-                       char *name = (char *) switch_xml_attr(directory, "name");
+                       char *name_attr = (char *) switch_xml_attr(directory, "name");
                        char *path = (char *) switch_xml_attr(directory, "path");
-                       launch_thread(name, path, directory);
+                       launch_thread(name_attr, path, directory);
                        x++;
                }
        } else if ((directory = switch_xml_find_child(cfg, "directory", "name", name))) {
index 2c3654e8970486e84bb98295ab3c92bdb2ac1d48..5d51a3e62a24b940d85c78d89035f77cee6ace07 100644 (file)
@@ -891,7 +891,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_codec_control(switch_codec_t *codec,
        if (!codec->implementation || !switch_core_codec_ready(codec)) {
                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Codec is not initialized!\n");
                abort();
-               return SWITCH_STATUS_NOT_INITALIZED;
+               //return SWITCH_STATUS_NOT_INITALIZED;
        }