mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-10-30 15:14:17 +00:00
fix warnings on windows x64 builds src and mods projects - only libsofia included on the libs side
This commit is contained in:
1 parent
38e0bfb5a8
commit
45ecbc2f61
30 files changed
+125
-70
No files matched your search
@@ -1065,7 +1065,7 @@ SWITCH_STANDARD_API(url_encode_function)
|
||||
int len = 0;
|
||||
|
||||
if (!zstr(cmd)) {
|
||||
len = (strlen(cmd) * 3) + 1;
|
||||
len = (int)(strlen(cmd) * 3) + 1;
|
||||
switch_zmalloc(data, len);
|
||||
switch_url_encode(cmd, data, len);
|
||||
reply = data;
|
||||
@@ -4218,7 +4218,7 @@ SWITCH_STANDARD_API(escape_function)
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
len = strlen(cmd) * 2;
|
||||
len = (int)strlen(cmd) * 2;
|
||||
mycmd = malloc(len);
|
||||
|
||||
stream->write_function(stream, "%s", switch_escape_string(cmd, mycmd, len));
|
||||
|
||||
@@ -1012,7 +1012,7 @@ static void *SWITCH_THREAD_FUNC conference_thread_run(switch_thread_t *thread, v
|
||||
uint8_t *file_frame;
|
||||
uint8_t *async_file_frame;
|
||||
int16_t *bptr;
|
||||
int x = 0;
|
||||
uint32_t x = 0;
|
||||
int32_t z = 0;
|
||||
int member_score_sum = 0;
|
||||
int divisor = 0;
|
||||
|
||||
@@ -393,7 +393,7 @@ static dir_profile_t *load_profile(const char *profile_name)
|
||||
profile_set_config(profile);
|
||||
|
||||
/* Add the params to the event structure */
|
||||
count = switch_event_import_xml(switch_xml_child(x_profile, "param"), "name", "value", &event);
|
||||
count = (int)switch_event_import_xml(switch_xml_child(x_profile, "param"), "name", "value", &event);
|
||||
|
||||
if (switch_xml_config_parse_event(event, count, SWITCH_FALSE, profile->config) != SWITCH_STATUS_SUCCESS) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Failed to process configuration\n");
|
||||
@@ -611,7 +611,7 @@ static switch_status_t on_dtmf(switch_core_session_t *session, void *input, swit
|
||||
}
|
||||
|
||||
if (strlen(cbr->digits) < sizeof(cbr->digits) - 2) {
|
||||
int at = strlen(cbr->digits);
|
||||
int at = (int)strlen(cbr->digits);
|
||||
cbr->digits[at++] = dtmf->digit;
|
||||
cbr->digits[at] = '\0';
|
||||
} else {
|
||||
|
||||
@@ -513,7 +513,6 @@ static switch_status_t caller_read_frame_callback(switch_core_session_t *session
|
||||
if (match_key(caller_exit_key, *buf)) {
|
||||
cd->abort = 1;
|
||||
return SWITCH_STATUS_FALSE;
|
||||
switch_channel_set_variable(channel, "fifo_caller_exit_key", (char *)buf);
|
||||
}
|
||||
cd->next = switch_epoch_time_now(NULL) + cd->freq;
|
||||
cd->index++;
|
||||
|
||||
@@ -852,7 +852,8 @@ static void do_config(switch_bool_t reload)
|
||||
const char *username = switch_xml_attr(x_list, "username");
|
||||
const char *password = switch_xml_attr(x_list, "password");
|
||||
const char *szinterval = switch_xml_attr(x_list, "interval");
|
||||
int port = 0, interval = 0;
|
||||
uint16_t port = 0;
|
||||
int interval = 0;
|
||||
limit_remote_t *remote;
|
||||
switch_threadattr_t *thd_attr = NULL;
|
||||
|
||||
@@ -866,7 +867,7 @@ static void do_config(switch_bool_t reload)
|
||||
}
|
||||
|
||||
if (!zstr(szport)) {
|
||||
port = atoi(szport);
|
||||
port = (uint16_t)atoi(szport);
|
||||
}
|
||||
|
||||
if (!zstr(szinterval)) {
|
||||
@@ -949,7 +950,7 @@ SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_hash_shutdown)
|
||||
/* Kill remote connections, destroy needs a wrlock so we unlock after finding a pointer */
|
||||
while(remote_clean) {
|
||||
void *val;
|
||||
const void *key;
|
||||
const void *key = NULL;
|
||||
switch_ssize_t keylen;
|
||||
limit_remote_t *item = NULL;
|
||||
|
||||
|
||||
@@ -167,7 +167,7 @@ static const char *do_cid(switch_memory_pool_t *pool, const char *cid, const cha
|
||||
switch_channel_t *channel = NULL;
|
||||
|
||||
if (!zstr(cid)) {
|
||||
len = strlen(cid);
|
||||
len = (uint32_t)strlen(cid);
|
||||
} else {
|
||||
goto done;
|
||||
}
|
||||
@@ -506,7 +506,7 @@ static char *expand_digits(switch_memory_pool_t *pool, char *digits, switch_bool
|
||||
int digit_len;
|
||||
SWITCH_STANDARD_STREAM(dig_stream);
|
||||
|
||||
digit_len = strlen(digits);
|
||||
digit_len = (int)strlen(digits);
|
||||
digits_copy = switch_core_strdup(pool, digits);
|
||||
|
||||
for (n = digit_len; n > 0; n--) {
|
||||
|
||||
@@ -419,10 +419,10 @@ static switch_status_t do_billing(switch_core_session_t *session)
|
||||
billaccount = switch_channel_get_variable(channel, "nibble_account");
|
||||
|
||||
if (!zstr(switch_channel_get_variable(channel, "nobal_amt"))) {
|
||||
nobal_amt = atof(switch_channel_get_variable(channel, "nobal_amt"));
|
||||
nobal_amt = (float)atof(switch_channel_get_variable(channel, "nobal_amt"));
|
||||
}
|
||||
if (!zstr(switch_channel_get_variable(channel, "lowbal_amt"))) {
|
||||
lowbal_amt = atof(switch_channel_get_variable(channel, "lowbal_amt"));
|
||||
lowbal_amt = (float)atof(switch_channel_get_variable(channel, "lowbal_amt"));
|
||||
}
|
||||
|
||||
/* Return if there's no billing information on this session */
|
||||
|
||||
@@ -93,7 +93,7 @@ static int encode_length(uint8_t *buf, int *len, int value)
|
||||
|
||||
if (value < 0x80) {
|
||||
/* 1 octet */
|
||||
buf[(*len)++] = value;
|
||||
buf[(*len)++] = (uint8_t)value;
|
||||
return value;
|
||||
}
|
||||
if (value < 0x4000) {
|
||||
@@ -106,7 +106,7 @@ static int encode_length(uint8_t *buf, int *len, int value)
|
||||
/* Fragmentation */
|
||||
multiplier = (value < 0x10000) ? (value >> 14) : 4;
|
||||
/* Set the first 2 bits of the octet */
|
||||
buf[(*len)++] = 0xC0 | multiplier;
|
||||
buf[(*len)++] = (uint8_t) (0xC0 | multiplier);
|
||||
return multiplier << 14;
|
||||
}
|
||||
|
||||
@@ -419,10 +419,10 @@ int udptl_build_packet(udptl_state_t *s, uint8_t buf[], const uint8_t msg[], int
|
||||
/* Span is defined as an inconstrained integer, which it dumb. It will only
|
||||
ever be a small value. Treat it as such. */
|
||||
buf[len++] = 1;
|
||||
buf[len++] = span;
|
||||
buf[len++] = (uint8_t)span;
|
||||
/* The number of entries is defined as a length, but will only ever be a small
|
||||
value. Treat it as such. */
|
||||
buf[len++] = entries;
|
||||
buf[len++] = (uint8_t)entries;
|
||||
for (m = 0; m < entries; m++) {
|
||||
/* Make an XOR'ed entry the maximum length */
|
||||
limit = (entry + m) & UDPTL_BUF_MASK;
|
||||
|
||||
Reference in new issue
Block a user