[svn-commits] kmoore: branch 12 r414474 - in /branches/12: channels/ main/ res/ res/parking...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Fri May 23 09:35:17 CDT 2014


Author: kmoore
Date: Fri May 23 09:35:00 2014
New Revision: 414474

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=414474
Log:
Fix signed/unsigned build warnings

Modified:
    branches/12/channels/chan_pjsip.c
    branches/12/main/bridge.c
    branches/12/main/event.c
    branches/12/res/parking/parking_bridge.c
    branches/12/res/parking/parking_bridge_features.c
    branches/12/res/parking/parking_manager.c
    branches/12/res/res_pjsip/config_transport.c
    branches/12/res/res_pjsip_refer.c
    branches/12/res/res_pjsip_sdp_rtp.c

Modified: branches/12/channels/chan_pjsip.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/channels/chan_pjsip.c?view=diff&rev=414474&r1=414473&r2=414474
==============================================================================
--- branches/12/channels/chan_pjsip.c (original)
+++ branches/12/channels/chan_pjsip.c Fri May 23 09:35:00 2014
@@ -361,7 +361,7 @@
 	}
 
 	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;
 	}
 
@@ -638,7 +638,7 @@
 	case AST_FRAME_MODEM:
 		break;
 	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;
 	}
 

Modified: branches/12/main/bridge.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/main/bridge.c?view=diff&rev=414474&r1=414473&r2=414474
==============================================================================
--- branches/12/main/bridge.c (original)
+++ branches/12/main/bridge.c Fri May 23 09:35:00 2014
@@ -268,7 +268,7 @@
  */
 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);
 
 	ast_bridge_lock(bridge);
@@ -487,7 +487,7 @@
 			continue;
 		}
 		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);
 			continue;
 		}
@@ -3144,7 +3144,7 @@
 		dtmf = builtin_features_dtmf[feature];
 		/* If no DTMF is still available (ie: it has been disabled) then error out now */
 		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);
 			return -1;
 		}
@@ -4944,7 +4944,7 @@
 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_ROW "%-20s %-20s %8d %s\n"
+#define FORMAT_ROW "%-20s %-20s %8u %s\n"
 
 	struct ast_bridge_technology *cur;
 
@@ -5131,7 +5131,7 @@
 			"Event: BridgeTechnologyListItem\r\n"
 			"BridgeTechnology: %s\r\n"
 			"BridgeType: %s\r\n"
-			"BridgePriority: %d\r\n"
+			"BridgePriority: %u\r\n"
 			"BridgeSuspended: %s\r\n"
 			"%s"
 			"\r\n",
@@ -5167,7 +5167,7 @@
 	if (!bridge) {
 		return;
 	}
-	prnt(where, "%s %s chans:%d",
+	prnt(where, "%s %s chans:%u",
 		bridge->uniqueid, bridge->v_table->name, bridge->num_channels);
 }
 

Modified: branches/12/main/event.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/main/event.c?view=diff&rev=414474&r1=414473&r2=414474
==============================================================================
--- branches/12/main/event.c (original)
+++ branches/12/main/event.c Fri May 23 09:35:00 2014
@@ -200,7 +200,7 @@
 	type = ast_event_get_type(event);
 
 	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 "";
 	}
 

Modified: branches/12/res/parking/parking_bridge.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/res/parking/parking_bridge.c?view=diff&rev=414474&r1=414473&r2=414474
==============================================================================
--- branches/12/res/parking/parking_bridge.c (original)
+++ branches/12/res/parking/parking_bridge.c Fri May 23 09:35:00 2014
@@ -304,7 +304,7 @@
 	if (!strcmp(blind_transfer, ast_channel_name(bridge_channel->chan)) && !park_datastore->silence_announce) {
 		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);
 	}
 

Modified: branches/12/res/parking/parking_bridge_features.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/res/parking/parking_bridge_features.c?view=diff&rev=414474&r1=414473&r2=414474
==============================================================================
--- branches/12/res/parking/parking_bridge_features.c (original)
+++ branches/12/res/parking/parking_bridge_features.c Fri May 23 09:35:00 2014
@@ -118,7 +118,7 @@
 	 * parked_subscription_data is tracking a transfer_channel_data struct. */
 	if (message->event_type == PARKED_CALL) {
 		/* 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) {
 			ast_bridge_channel_queue_playfile(bridge_channel, say_parking_space, saynum_buf, NULL);
 		} else {
@@ -664,7 +664,7 @@
 	int numeric_value;
 	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. */
 		ast_assert(0);
 		ast_bridge_channel_leave_bridge(bridge_channel,

Modified: branches/12/res/parking/parking_manager.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/res/parking/parking_manager.c?view=diff&rev=414474&r1=414473&r2=414474
==============================================================================
--- branches/12/res/parking/parking_manager.c (original)
+++ branches/12/res/parking/parking_manager.c Fri May 23 09:35:00 2014
@@ -389,7 +389,7 @@
 		"Name: %s\r\n"
 		"StartSpace: %d\r\n"
 		"StopSpace: %d\r\n"
-		"Timeout: %d\r\n"
+		"Timeout: %u\r\n"
 		"%s" /* The Action ID */
 		"\r\n",
 		curlot->name,

Modified: branches/12/res/res_pjsip/config_transport.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/res/res_pjsip/config_transport.c?view=diff&rev=414474&r1=414473&r2=414474
==============================================================================
--- branches/12/res/res_pjsip/config_transport.c (original)
+++ branches/12/res/res_pjsip/config_transport.c Fri May 23 09:35:00 2014
@@ -519,7 +519,7 @@
 		value = value << 2;
 		ast_log(LOG_WARNING,
 			"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);
 	}
 
@@ -531,7 +531,7 @@
 {
 	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 0;
@@ -605,7 +605,7 @@
 
 	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",
 		ast_sorcery_object_get_id(transport),
 		ARRAY_IN_BOUNDS(transport->type, transport_types) ? transport_types[transport->type] : "Unknown",

Modified: branches/12/res/res_pjsip_refer.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/res/res_pjsip_refer.c?view=diff&rev=414474&r1=414473&r2=414474
==============================================================================
--- branches/12/res/res_pjsip_refer.c (original)
+++ branches/12/res/res_pjsip_refer.c Fri May 23 09:35:00 2014
@@ -112,7 +112,7 @@
 
 	/* If the subscription has already been terminated we can't send a notification */
 	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);
 		return 0;
 	}
@@ -133,7 +133,7 @@
 		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);
 
 	/* Actually send the notification */

Modified: branches/12/res/res_pjsip_sdp_rtp.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/res/res_pjsip_sdp_rtp.c?view=diff&rev=414474&r1=414473&r2=414474
==============================================================================
--- branches/12/res/res_pjsip_sdp_rtp.c (original)
+++ branches/12/res/res_pjsip_sdp_rtp.c Fri May 23 09:35:00 2014
@@ -348,7 +348,7 @@
 	for (; (candidate = ao2_iterator_next(&it_candidates)); ao2_ref(candidate, -1)) {
 		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));
 		ast_str_append(&attr_candidate, -1, "%s typ ", ast_sockaddr_stringify_port(&candidate->address));
 
@@ -409,7 +409,7 @@
 	/* Find all of the candidates */
 	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] = "";
-		int port, relay_port = 0;
+		unsigned int port, relay_port = 0;
 		struct ast_rtp_engine_ice_candidate candidate = { 0, };
 
 		attr = remote_stream->attr[attr_i];
@@ -422,7 +422,7 @@
 		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,
-			&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 */
 			continue;
 		}




More information about the svn-commits mailing list