mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-10-31 07:34:19 +00:00
FS-7966: fix more msvc 2015 warnings.
This commit is contained in:
1 parent
4b8587a863
commit
5c59a0159d
30 files changed
+79
-66
No files matched your search
@@ -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;
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
<AdditionalOptions> /J</AdditionalOptions>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<DisableSpecificWarnings>4100;4701;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<DisableSpecificWarnings>6031;4100;4701;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
@@ -89,7 +89,7 @@
|
||||
<AdditionalOptions> /J</AdditionalOptions>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<DisableSpecificWarnings>4100;4701;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<DisableSpecificWarnings>6031;4100;4701;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
@@ -103,7 +103,7 @@
|
||||
<AdditionalOptions> /J</AdditionalOptions>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<DisableSpecificWarnings>4100;4701;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<DisableSpecificWarnings>6031;4100;4701;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
@@ -119,7 +119,7 @@
|
||||
<AdditionalOptions> /J</AdditionalOptions>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<DisableSpecificWarnings>4100;4701;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<DisableSpecificWarnings>6031;4100;4701;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
|
||||
@@ -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] = "";
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -146,7 +146,12 @@
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="mod_redis.c" />
|
||||
<ClCompile Include="credis.c" />
|
||||
<ClCompile Include="credis.c">
|
||||
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4005;4389;4133;4244;4706;4306;4996;6340;6246;6011;6387;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4005;4389;4133;4244;4706;4306;4996;6340;6246;6011;6387;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">4005;4389;4133;4244;4706;4306;4996;6340;6246;6011;6387;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|x64'">4005;4389;4133;4244;4706;4306;4996;6340;6246;6011;6387;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\..\w32\Library\FreeSwitchCore.2015.vcxproj">
|
||||
|
||||
Reference in new issue
Block a user