Fix signed/unsigned build warnings

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@414474 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Kinsey Moore
2014-05-23 14:35:00 +00:00
parent 3c34202363
commit b2992655d1
9 changed files with 21 additions and 21 deletions

View File

@@ -361,7 +361,7 @@ static struct ast_channel *chan_pjsip_new(struct ast_sip_session *session, int s
} }
if (!(chan = ast_channel_alloc(1, state, S_OR(session->id.number.str, ""), S_OR(session->id.name.str, ""), "", "", "", assignedids, requestor, 0, "PJSIP/%s-%08x", ast_sorcery_object_get_id(session->endpoint), if (!(chan = ast_channel_alloc(1, state, S_OR(session->id.number.str, ""), S_OR(session->id.name.str, ""), "", "", "", assignedids, requestor, 0, "PJSIP/%s-%08x", ast_sorcery_object_get_id(session->endpoint),
ast_atomic_fetchadd_int((int *)&chan_idx, +1)))) { (unsigned)ast_atomic_fetchadd_int((int *)&chan_idx, +1)))) {
return NULL; return NULL;
} }
@@ -638,7 +638,7 @@ static int chan_pjsip_write(struct ast_channel *ast, struct ast_frame *frame)
case AST_FRAME_MODEM: case AST_FRAME_MODEM:
break; break;
default: default:
ast_log(LOG_WARNING, "Can't send %d type frames with PJSIP\n", frame->frametype); ast_log(LOG_WARNING, "Can't send %u type frames with PJSIP\n", frame->frametype);
break; break;
} }

View File

@@ -268,7 +268,7 @@ int ast_bridge_technology_unregister(struct ast_bridge_technology *technology)
*/ */
static void bridge_queue_action_nodup(struct ast_bridge *bridge, struct ast_frame *action) static void bridge_queue_action_nodup(struct ast_bridge *bridge, struct ast_frame *action)
{ {
ast_debug(1, "Bridge %s: queueing action type:%d sub:%d\n", ast_debug(1, "Bridge %s: queueing action type:%u sub:%d\n",
bridge->uniqueid, action->frametype, action->subclass.integer); bridge->uniqueid, action->frametype, action->subclass.integer);
ast_bridge_lock(bridge); ast_bridge_lock(bridge);
@@ -487,7 +487,7 @@ static struct ast_bridge_technology *find_best_technology(uint32_t capabilities,
continue; continue;
} }
if (best && current->preference <= best->preference) { if (best && current->preference <= best->preference) {
ast_debug(1, "Bridge technology %s has less preference than %s (%d <= %d). Skipping.\n", ast_debug(1, "Bridge technology %s has less preference than %s (%u <= %u). Skipping.\n",
current->name, best->name, current->preference, best->preference); current->name, best->name, current->preference, best->preference);
continue; continue;
} }
@@ -3144,7 +3144,7 @@ int ast_bridge_features_enable(struct ast_bridge_features *features,
dtmf = builtin_features_dtmf[feature]; dtmf = builtin_features_dtmf[feature];
/* If no DTMF is still available (ie: it has been disabled) then error out now */ /* If no DTMF is still available (ie: it has been disabled) then error out now */
if (ast_strlen_zero(dtmf)) { if (ast_strlen_zero(dtmf)) {
ast_debug(1, "Failed to enable built in feature %d on %p, no DTMF string is available for it.\n", ast_debug(1, "Failed to enable built in feature %u on %p, no DTMF string is available for it.\n",
feature, features); feature, features);
return -1; return -1;
} }
@@ -4944,7 +4944,7 @@ static const char *tech_capability2str(uint32_t capabilities)
static char *handle_bridge_technology_show(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) static char *handle_bridge_technology_show(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
{ {
#define FORMAT_HDR "%-20s %-20s %8s %s\n" #define FORMAT_HDR "%-20s %-20s %8s %s\n"
#define FORMAT_ROW "%-20s %-20s %8d %s\n" #define FORMAT_ROW "%-20s %-20s %8u %s\n"
struct ast_bridge_technology *cur; struct ast_bridge_technology *cur;
@@ -5131,7 +5131,7 @@ static int manager_bridge_tech_list(struct mansession *s, const struct message *
"Event: BridgeTechnologyListItem\r\n" "Event: BridgeTechnologyListItem\r\n"
"BridgeTechnology: %s\r\n" "BridgeTechnology: %s\r\n"
"BridgeType: %s\r\n" "BridgeType: %s\r\n"
"BridgePriority: %d\r\n" "BridgePriority: %u\r\n"
"BridgeSuspended: %s\r\n" "BridgeSuspended: %s\r\n"
"%s" "%s"
"\r\n", "\r\n",
@@ -5167,7 +5167,7 @@ static void bridge_prnt_obj(void *v_obj, void *where, ao2_prnt_fn *prnt)
if (!bridge) { if (!bridge) {
return; return;
} }
prnt(where, "%s %s chans:%d", prnt(where, "%s %s chans:%u",
bridge->uniqueid, bridge->v_table->name, bridge->num_channels); bridge->uniqueid, bridge->v_table->name, bridge->num_channels);
} }

View File

@@ -200,7 +200,7 @@ const char *ast_event_get_type_name(const struct ast_event *event)
type = ast_event_get_type(event); type = ast_event_get_type(event);
if (type < 0 || type >= ARRAY_LEN(event_names)) { if (type < 0 || type >= ARRAY_LEN(event_names)) {
ast_log(LOG_ERROR, "Invalid event type - '%d'\n", type); ast_log(LOG_ERROR, "Invalid event type - '%u'\n", type);
return ""; return "";
} }

View File

@@ -304,7 +304,7 @@ static int bridge_parking_push(struct ast_bridge_parking *self, struct ast_bridg
if (!strcmp(blind_transfer, ast_channel_name(bridge_channel->chan)) && !park_datastore->silence_announce) { if (!strcmp(blind_transfer, ast_channel_name(bridge_channel->chan)) && !park_datastore->silence_announce) {
char saynum_buf[16]; char saynum_buf[16];
snprintf(saynum_buf, sizeof(saynum_buf), "%u %u", 0, pu->parking_space); snprintf(saynum_buf, sizeof(saynum_buf), "%d %d", 0, pu->parking_space);
ast_bridge_channel_queue_playfile(bridge_channel, say_parking_space, saynum_buf, NULL); ast_bridge_channel_queue_playfile(bridge_channel, say_parking_space, saynum_buf, NULL);
} }

View File

@@ -118,7 +118,7 @@ static void parker_parked_call_message_response(struct ast_parked_call_payload *
* parked_subscription_data is tracking a transfer_channel_data struct. */ * parked_subscription_data is tracking a transfer_channel_data struct. */
if (message->event_type == PARKED_CALL) { if (message->event_type == PARKED_CALL) {
/* queue the saynum on the bridge channel and hangup */ /* queue the saynum on the bridge channel and hangup */
snprintf(saynum_buf, sizeof(saynum_buf), "%u %u", data->hangup_after, message->parkingspace); snprintf(saynum_buf, sizeof(saynum_buf), "%d %u", data->hangup_after, message->parkingspace);
if (!data->transfer_data) { if (!data->transfer_data) {
ast_bridge_channel_queue_playfile(bridge_channel, say_parking_space, saynum_buf, NULL); ast_bridge_channel_queue_playfile(bridge_channel, say_parking_space, saynum_buf, NULL);
} else { } else {
@@ -664,7 +664,7 @@ void say_parking_space(struct ast_bridge_channel *bridge_channel, const char *pa
int numeric_value; int numeric_value;
int hangup_after; int hangup_after;
if (sscanf(payload, "%u %u", &hangup_after, &numeric_value) != 2) { if (sscanf(payload, "%d %d", &hangup_after, &numeric_value) != 2) {
/* If say_parking_space is called with a non-numeric string, we have a problem. */ /* If say_parking_space is called with a non-numeric string, we have a problem. */
ast_assert(0); ast_assert(0);
ast_bridge_channel_leave_bridge(bridge_channel, ast_bridge_channel_leave_bridge(bridge_channel,

View File

@@ -389,7 +389,7 @@ static int manager_append_event_parking_lot_data_cb(void *obj, void *arg, void *
"Name: %s\r\n" "Name: %s\r\n"
"StartSpace: %d\r\n" "StartSpace: %d\r\n"
"StopSpace: %d\r\n" "StopSpace: %d\r\n"
"Timeout: %d\r\n" "Timeout: %u\r\n"
"%s" /* The Action ID */ "%s" /* The Action ID */
"\r\n", "\r\n",
curlot->name, curlot->name,

View File

@@ -519,7 +519,7 @@ static int transport_tos_handler(const struct aco_option *opt, struct ast_variab
value = value << 2; value = value << 2;
ast_log(LOG_WARNING, ast_log(LOG_WARNING,
"transport '%s' - 'tos' value '%s' uses bits that are " "transport '%s' - 'tos' value '%s' uses bits that are "
"discarded when converted to DSCP. Using equivalent %d instead.\n", "discarded when converted to DSCP. Using equivalent %u instead.\n",
ast_sorcery_object_get_id(transport), var->value, value); ast_sorcery_object_get_id(transport), var->value, value);
} }
@@ -531,7 +531,7 @@ static int tos_to_str(const void *obj, const intptr_t *args, char **buf)
{ {
const struct ast_sip_transport *transport = obj; const struct ast_sip_transport *transport = obj;
if (ast_asprintf(buf, "%d", transport->tos) == -1) { if (ast_asprintf(buf, "%u", transport->tos) == -1) {
return -1; return -1;
} }
return 0; return 0;
@@ -605,7 +605,7 @@ static int cli_print_body(void *obj, void *arg, int flags)
pj_sockaddr_print(&transport->host, hoststr, sizeof(hoststr), 3); pj_sockaddr_print(&transport->host, hoststr, sizeof(hoststr), 3);
ast_str_append(&context->output_buffer, 0, "%*s: %-21s %6s %5d %5d %s\n", ast_str_append(&context->output_buffer, 0, "%*s: %-21s %6s %5u %5u %s\n",
CLI_INDENT_TO_SPACES(context->indent_level), "Transport", CLI_INDENT_TO_SPACES(context->indent_level), "Transport",
ast_sorcery_object_get_id(transport), ast_sorcery_object_get_id(transport),
ARRAY_IN_BOUNDS(transport->type, transport_types) ? transport_types[transport->type] : "Unknown", ARRAY_IN_BOUNDS(transport->type, transport_types) ? transport_types[transport->type] : "Unknown",

View File

@@ -112,7 +112,7 @@ static int refer_progress_notify(void *data)
/* If the subscription has already been terminated we can't send a notification */ /* If the subscription has already been terminated we can't send a notification */
if (!(sub = notification->progress->sub)) { if (!(sub = notification->progress->sub)) {
ast_debug(3, "Not sending NOTIFY of response '%d' and state '%d' on progress monitor '%p' as subscription has been terminated\n", ast_debug(3, "Not sending NOTIFY of response '%d' and state '%u' on progress monitor '%p' as subscription has been terminated\n",
notification->response, notification->state, notification->progress); notification->response, notification->state, notification->progress);
return 0; return 0;
} }
@@ -133,7 +133,7 @@ static int refer_progress_notify(void *data)
notification->progress->sub = NULL; notification->progress->sub = NULL;
} }
ast_debug(3, "Sending NOTIFY with response '%d' and state '%d' on subscription '%p' and progress monitor '%p'\n", ast_debug(3, "Sending NOTIFY with response '%d' and state '%u' on subscription '%p' and progress monitor '%p'\n",
notification->response, notification->state, sub, notification->progress); notification->response, notification->state, sub, notification->progress);
/* Actually send the notification */ /* Actually send the notification */

View File

@@ -348,7 +348,7 @@ static void add_ice_to_stream(struct ast_sip_session *session, struct ast_sip_se
for (; (candidate = ao2_iterator_next(&it_candidates)); ao2_ref(candidate, -1)) { for (; (candidate = ao2_iterator_next(&it_candidates)); ao2_ref(candidate, -1)) {
struct ast_str *attr_candidate = ast_str_create(128); struct ast_str *attr_candidate = ast_str_create(128);
ast_str_set(&attr_candidate, -1, "%s %d %s %d %s ", candidate->foundation, candidate->id, candidate->transport, ast_str_set(&attr_candidate, -1, "%s %u %s %d %s ", candidate->foundation, candidate->id, candidate->transport,
candidate->priority, ast_sockaddr_stringify_host(&candidate->address)); candidate->priority, ast_sockaddr_stringify_host(&candidate->address));
ast_str_append(&attr_candidate, -1, "%s typ ", ast_sockaddr_stringify_port(&candidate->address)); ast_str_append(&attr_candidate, -1, "%s typ ", ast_sockaddr_stringify_port(&candidate->address));
@@ -409,7 +409,7 @@ static void process_ice_attributes(struct ast_sip_session *session, struct ast_s
/* Find all of the candidates */ /* Find all of the candidates */
for (attr_i = 0; attr_i < remote_stream->attr_count; ++attr_i) { for (attr_i = 0; attr_i < remote_stream->attr_count; ++attr_i) {
char foundation[32], transport[32], address[PJ_INET6_ADDRSTRLEN + 1], cand_type[6], relay_address[PJ_INET6_ADDRSTRLEN + 1] = ""; char foundation[32], transport[32], address[PJ_INET6_ADDRSTRLEN + 1], cand_type[6], relay_address[PJ_INET6_ADDRSTRLEN + 1] = "";
int port, relay_port = 0; unsigned int port, relay_port = 0;
struct ast_rtp_engine_ice_candidate candidate = { 0, }; struct ast_rtp_engine_ice_candidate candidate = { 0, };
attr = remote_stream->attr[attr_i]; attr = remote_stream->attr[attr_i];
@@ -422,7 +422,7 @@ static void process_ice_attributes(struct ast_sip_session *session, struct ast_s
ast_copy_pj_str(attr_value, (pj_str_t*)&attr->value, sizeof(attr_value)); ast_copy_pj_str(attr_value, (pj_str_t*)&attr->value, sizeof(attr_value));
if (sscanf(attr_value, "%31s %30u %31s %30u %46s %30u typ %5s %*s %23s %*s %30u", foundation, &candidate.id, transport, if (sscanf(attr_value, "%31s %30u %31s %30u %46s %30u typ %5s %*s %23s %*s %30u", foundation, &candidate.id, transport,
&candidate.priority, address, &port, cand_type, relay_address, &relay_port) < 7) { (unsigned *)&candidate.priority, address, &port, cand_type, relay_address, &relay_port) < 7) {
/* Candidate did not parse properly */ /* Candidate did not parse properly */
continue; continue;
} }