[svn-commits] kmoore: branch 12 r419163 - in /branches/12: ./ addons/ addons/ooh323c/src/ a...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Tue Jul 22 09:13:21 CDT 2014


Author: kmoore
Date: Tue Jul 22 09:13:14 2014
New Revision: 419163

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=419163
Log:
Fix more dev-mode build issues
........

Merged revisions 419129 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 419162 from http://svn.asterisk.org/svn/asterisk/branches/11

Modified:
    branches/12/   (props changed)
    branches/12/addons/chan_ooh323.c
    branches/12/addons/ooh323c/src/ooq931.c
    branches/12/addons/ooh323c/src/printHandler.c
    branches/12/apps/app_meetme.c
    branches/12/channels/chan_gtalk.c
    branches/12/channels/chan_jingle.c
    branches/12/res/res_corosync.c
    branches/12/res/res_jabber.c
    branches/12/res/res_mwi_external_ami.c
    branches/12/tests/test_abstract_jb.c
    branches/12/tests/test_aoc.c
    branches/12/tests/test_astobj2.c
    branches/12/tests/test_astobj2_thrash.c
    branches/12/tests/test_config.c
    branches/12/tests/test_event.c
    branches/12/tests/test_format_api.c
    branches/12/tests/test_hashtab_thrash.c
    branches/12/tests/test_json.c
    branches/12/tests/test_logger.c
    branches/12/tests/test_optional_api.c
    branches/12/tests/test_sorcery.c
    branches/12/tests/test_sorcery_realtime.c
    branches/12/tests/test_voicemail_api.c

Propchange: branches/12/
------------------------------------------------------------------------------
Binary property 'branch-11-merged' - no diff available.

Modified: branches/12/addons/chan_ooh323.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/addons/chan_ooh323.c?view=diff&rev=419163&r1=419162&r2=419163
==============================================================================
--- branches/12/addons/chan_ooh323.c (original)
+++ branches/12/addons/chan_ooh323.c Tue Jul 22 09:13:14 2014
@@ -1113,7 +1113,7 @@
 			ast_channel_lock(ast);
 			if (!p->alertsent) {
 	    			if (gH323Debug) {
-					ast_debug(1, "Sending forced ringback for %s, res = %d\n", 
+					ast_debug(1, "Sending forced ringback for %s, res = %u\n", 
 						callToken, ooManualRingback(callToken));
 				} else {
 	    				ooManualRingback(callToken);
@@ -1168,7 +1168,7 @@
 		p->lastrtptx = time(NULL);
 
 		if (f->frametype == AST_FRAME_MODEM) {
-			ast_debug(1, "Send UDPTL %d/%d len %d for %s\n",
+			ast_debug(1, "Send UDPTL %u/%d len %d for %s\n",
 				f->frametype, f->subclass.integer, f->datalen, ast_channel_name(ast));
 			if (p->udptl)
 				res = ast_udptl_write(p->udptl, f);
@@ -1213,7 +1213,7 @@
 			ast_mutex_unlock(&p->lock);
 			return 0;
 		} else {
-			ast_log(LOG_WARNING, "Can't send %d type frames with OOH323 write\n", 
+			ast_log(LOG_WARNING, "Can't send %u type frames with OOH323 write\n", 
 									 f->frametype);
 			ast_mutex_unlock(&p->lock);
 			return 0;
@@ -1277,7 +1277,7 @@
 		if (ast_channel_state(ast) != AST_STATE_UP) {
 	    		if (!p->progsent) {
 	     			if (gH323Debug) {
-					ast_debug(1, "Sending manual progress for %s, res = %d\n", callToken,
+					ast_debug(1, "Sending manual progress for %s, res = %u\n", callToken,
              				ooManualProgress(callToken));	
 				} else {
 	     				ooManualProgress(callToken);
@@ -1290,7 +1290,7 @@
 		if (ast_channel_state(ast) == AST_STATE_RING || ast_channel_state(ast) == AST_STATE_RINGING) {
 			if (!p->alertsent) {
 				if (gH323Debug) {
-					ast_debug(1, "Sending manual ringback for %s, res = %d\n",
+					ast_debug(1, "Sending manual ringback for %s, res = %u\n",
 						callToken,
 						ooManualRingback(callToken));
 				} else {
@@ -3177,7 +3177,7 @@
 		ast_cli(a->fd, "%-15.15s%s\n", "AccountCode: ", peer->accountcode);
 		ast_cli(a->fd, "%-15.15s%s\n", "AMA flags: ", ast_channel_amaflags2string(peer->amaflags));
 		ast_cli(a->fd, "%-15.15s%s\n", "IP:Port: ", ip_port);
-		ast_cli(a->fd, "%-15.15s%d\n", "OutgoingLimit: ", peer->outgoinglimit);
+		ast_cli(a->fd, "%-15.15s%u\n", "OutgoingLimit: ", peer->outgoinglimit);
 		ast_cli(a->fd, "%-15.15s%d\n", "rtptimeout: ", peer->rtptimeout);
 		ast_cli(a->fd, "%-15.15s%s\n", "nat: ", peer->nat?"yes":"no");
 		if (peer->rtpmaskstr[0]) {
@@ -3337,7 +3337,7 @@
 		ast_cli(a->fd, "%-15.15s%s\n", "AMA flags: ", ast_channel_amaflags2string(user->amaflags));
 		ast_cli(a->fd, "%-15.15s%s\n", "Context: ", user->context);
 		ast_cli(a->fd, "%-15.15s%d\n", "IncomingLimit: ", user->incominglimit);
-		ast_cli(a->fd, "%-15.15s%d\n", "InUse: ", user->inUse);
+		ast_cli(a->fd, "%-15.15s%u\n", "InUse: ", user->inUse);
 		ast_cli(a->fd, "%-15.15s%d\n", "rtptimeout: ", user->rtptimeout);
 		ast_cli(a->fd, "%-15.15s%s\n", "nat: ", user->nat?"yes":"no");
 		if (user->rtpmaskstr[0]) {
@@ -4361,7 +4361,7 @@
 
 	ast_rtp_instance_get_remote_address(*rtp, &tmp);
 	if (gH323Debug) {
-		ast_verb(0, "ooh323_get_rtp_peer  %s -> %s:%d, %d\n", ast_channel_name(chan), ast_sockaddr_stringify_addr(&tmp),
+		ast_verb(0, "ooh323_get_rtp_peer  %s -> %s:%d, %u\n", ast_channel_name(chan), ast_sockaddr_stringify_addr(&tmp),
 						ast_sockaddr_port(&tmp), res);
 	}
 	if (gH323Debug) {
@@ -4912,7 +4912,7 @@
 	case 5:
 		f = ast_udptl_read(p->udptl);		/* UDPTL t.38 data */
 		if (gH323Debug) {
-			 ast_debug(1, "Got UDPTL %d/%d len %d for %s\n",
+			 ast_debug(1, "Got UDPTL %u/%d len %d for %s\n",
 				f->frametype, f->subclass.integer, f->datalen, ast_channel_name(ast));
 		}
 		p->lastrtprx = time(NULL);

Modified: branches/12/addons/ooh323c/src/ooq931.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/addons/ooh323c/src/ooq931.c?view=diff&rev=419163&r1=419162&r2=419163
==============================================================================
--- branches/12/addons/ooh323c/src/ooq931.c (original)
+++ branches/12/addons/ooh323c/src/ooq931.c Tue Jul 22 09:13:14 2014
@@ -319,7 +319,7 @@
          strcpy(buf, "Escape");
          break;
       default:
-         sprintf(buf, "<%u>", messageType);
+         sprintf(buf, "<%d>", messageType);
    }
    return buf;
 }
@@ -360,7 +360,7 @@
          strcpy(buf, "User-User");
          break;
       default:
-         sprintf(buf, "0x%02x", number);
+         sprintf(buf, "0x%02x", (unsigned)number);
    }
    return buf;
 }
@@ -371,8 +371,8 @@
    unsigned int i;
 
    printf("Q.931 Message:\n");
-   printf("   protocolDiscriminator: %i\n", q931msg->protocolDiscriminator);
-   printf("   callReference: %i\n", q931msg->callReference);
+   printf("   protocolDiscriminator: %u\n", q931msg->protocolDiscriminator);
+   printf("   callReference: %u\n", q931msg->callReference);
    printf("   from: %s\n", (q931msg->fromDestination ? 
                                        "destination" : "originator"));
    printf("   messageType: %s (0x%X)\n\n", 
@@ -382,9 +382,9 @@
    for(i = 0, curNode = q931msg->ies.head; i < q931msg->ies.count; i++) {
       Q931InformationElement *ie = (Q931InformationElement*) curNode->data;
       int length = (ie->length >= 0) ? ie->length : -ie->length;
-      printf("   IE[%i] (offset 0x%X):\n", i, ie->offset);
+      printf("   IE[%u] (offset 0x%X):\n", i, (unsigned)ie->offset);
       printf("      discriminator: %s (0x%X)\n", 
-               ooQ931GetIEName(ie->discriminator, buf), ie->discriminator);
+               ooQ931GetIEName(ie->discriminator, buf), (unsigned)ie->discriminator);
       printf("      data length: %i\n", length);
  
       curNode = curNode->next;

Modified: branches/12/addons/ooh323c/src/printHandler.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/addons/ooh323c/src/printHandler.c?view=diff&rev=419163&r1=419162&r2=419163
==============================================================================
--- branches/12/addons/ooh323c/src/printHandler.c (original)
+++ branches/12/addons/ooh323c/src/printHandler.c Tue Jul 22 09:13:14 2014
@@ -268,7 +268,7 @@
       if (bufsiz > 1) buffer[1] = '\0';
       for (i = 0; i < numocts; i++) {
          if (i < bufsiz - 1) {
-            sprintf (lbuf, "%02x", data[i]);
+            sprintf (lbuf, "%02x", (unsigned)data[i]);
             strcat (&buffer[(i*2)+1], lbuf);
          }
          else break;

Modified: branches/12/apps/app_meetme.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/apps/app_meetme.c?view=diff&rev=419163&r1=419162&r2=419163
==============================================================================
--- branches/12/apps/app_meetme.c (original)
+++ branches/12/apps/app_meetme.c Tue Jul 22 09:13:14 2014
@@ -3239,7 +3239,7 @@
 
 	if (ast_test_flag64(confflags, CONFFLAG_DURATION_STOP) && !ast_strlen_zero(optargs[OPT_ARG_DURATION_STOP])) {
 		calldurationlimit = atoi(optargs[OPT_ARG_DURATION_STOP]);
-		ast_verb(3, "Setting call duration limit to %d seconds.\n", calldurationlimit);
+		ast_verb(3, "Setting call duration limit to %u seconds.\n", calldurationlimit);
 	}
 
 	if (ast_test_flag64(confflags, CONFFLAG_DURATION_LIMIT) && !ast_strlen_zero(optargs[OPT_ARG_DURATION_LIMIT])) {
@@ -4275,12 +4275,12 @@
 						break;
 					default:
 						ast_debug(1,
-							"Got ignored control frame on channel %s, f->frametype=%d,f->subclass=%d\n",
+							"Got ignored control frame on channel %s, f->frametype=%u,f->subclass=%d\n",
 							ast_channel_name(chan), f->frametype, f->subclass.integer);
 					}
 				} else {
 					ast_debug(1,
-						"Got unrecognized frame on channel %s, f->frametype=%d,f->subclass=%d\n",
+						"Got unrecognized frame on channel %s, f->frametype=%u,f->subclass=%d\n",
 						ast_channel_name(chan), f->frametype, f->subclass.integer);
 				}
 				ast_frfree(f);
@@ -7104,7 +7104,7 @@
 		ast_cond_destroy(&cond);
 		ast_autoservice_stop(chan);
 		if (!trunk_ref->trunk->chan) {
-			ast_debug(1, "Trunk didn't get created. chan: %lx\n", (long) trunk_ref->trunk->chan);
+			ast_debug(1, "Trunk didn't get created. chan: %lx\n", (unsigned long) trunk_ref->trunk->chan);
 			pbx_builtin_setvar_helper(chan, "SLASTATION_STATUS", "CONGESTION");
 			sla_change_trunk_state(trunk_ref->trunk, SLA_TRUNK_STATE_IDLE, ALL_TRUNK_REFS, NULL);
 			trunk_ref->chan = NULL;

Modified: branches/12/channels/chan_gtalk.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/channels/chan_gtalk.c?view=diff&rev=419163&r1=419162&r2=419163
==============================================================================
--- branches/12/channels/chan_gtalk.c (original)
+++ branches/12/channels/chan_gtalk.c Tue Jul 22 09:13:14 2014
@@ -1144,7 +1144,7 @@
 		n2 = title;
 	else
 		n2 = i->us;
-	tmp = ast_channel_alloc(1, state, i->cid_num, i->cid_name, client->accountcode, i->exten, client->context, assignedids, requestor, client->amaflags, "Gtalk/%s-%04lx", n2, ast_random() & 0xffff);
+	tmp = ast_channel_alloc(1, state, i->cid_num, i->cid_name, client->accountcode, i->exten, client->context, assignedids, requestor, client->amaflags, "Gtalk/%s-%04lx", n2, (unsigned long)(ast_random() & 0xffff));
 	if (!tmp) {
 		ast_log(LOG_WARNING, "Unable to allocate Gtalk channel structure!\n");
 		return NULL;

Modified: branches/12/channels/chan_jingle.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/channels/chan_jingle.c?view=diff&rev=419163&r1=419162&r2=419163
==============================================================================
--- branches/12/channels/chan_jingle.c (original)
+++ branches/12/channels/chan_jingle.c Tue Jul 22 09:13:14 2014
@@ -858,7 +858,7 @@
 		str = title;
 	else
 		str = i->them;
-	tmp = ast_channel_alloc(1, state, i->cid_num, i->cid_name, "", "", "", assignedids, requestor, 0, "Jingle/%s-%04lx", str, ast_random() & 0xffff);
+	tmp = ast_channel_alloc(1, state, i->cid_num, i->cid_name, "", "", "", assignedids, requestor, 0, "Jingle/%s-%04lx", str, (unsigned long)(ast_random() & 0xffff));
 	if (!tmp) {
 		ast_log(LOG_WARNING, "Unable to allocate Jingle channel structure!\n");
 		return NULL;

Modified: branches/12/res/res_corosync.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/res/res_corosync.c?view=diff&rev=419163&r1=419162&r2=419163
==============================================================================
--- branches/12/res/res_corosync.c (original)
+++ branches/12/res/res_corosync.c Tue Jul 22 09:13:14 2014
@@ -333,7 +333,7 @@
 		ast_eid_to_str(buf, sizeof(buf), (struct ast_eid *) eid);
 		ast_log(LOG_NOTICE, "Got event PING from server with EID: '%s'\n", buf);
 	}
-	ast_debug(5, "Publishing event %s (%d) to stasis\n",
+	ast_debug(5, "Publishing event %s (%u) to stasis\n",
 		ast_event_get_type_name(event), event_type);
 	publish_handler(event);
 }
@@ -367,13 +367,13 @@
 	iov.iov_base = (void *)event;
 	iov.iov_len = ast_event_get_size(event);
 
-	ast_debug(5, "Publishing event %s (%d) to corosync\n",
+	ast_debug(5, "Publishing event %s (%u) to corosync\n",
 		ast_event_get_type_name(event), ast_event_get_type(event));
 
 	/* The stasis subscription will only exist if we are configured to publish
 	 * these events, so just send away. */
 	if ((cs_err = cpg_mcast_joined(cpg_handle, CPG_TYPE_FIFO, &iov, 1)) != CS_OK) {
-		ast_log(LOG_WARNING, "CPG mcast failed (%d)\n", cs_err);
+		ast_log(LOG_WARNING, "CPG mcast failed (%u)\n", cs_err);
 	}
 }
 
@@ -476,13 +476,13 @@
 
 		if (pfd[0].revents & POLLIN) {
 			if ((cs_err = cpg_dispatch(cpg_handle, CS_DISPATCH_ALL)) != CS_OK) {
-				ast_log(LOG_WARNING, "Failed CPG dispatch: %d\n", cs_err);
+				ast_log(LOG_WARNING, "Failed CPG dispatch: %u\n", cs_err);
 			}
 		}
 
 		if (pfd[1].revents & POLLIN) {
 			if ((cs_err = corosync_cfg_dispatch(cfg_handle, CS_DISPATCH_ALL)) != CS_OK) {
-				ast_log(LOG_WARNING, "Failed CFG dispatch: %d\n", cs_err);
+				ast_log(LOG_WARNING, "Failed CFG dispatch: %u\n", cs_err);
 			}
 		}
 
@@ -582,7 +582,7 @@
 			continue;
 		}
 
-		ast_cli(a->fd, "=== Node %d\n", i);
+		ast_cli(a->fd, "=== Node %u\n", i);
 		ast_cli(a->fd, "=== --> Group: %s\n", cpg_desc.group.value);
 
 		for (j = 0; j < num_addrs; j++) {
@@ -592,7 +592,7 @@
 
 			getnameinfo(sa, sa_len, buf, sizeof(buf), NULL, 0, NI_NUMERICHOST);
 
-			ast_cli(a->fd, "=== --> Address %d: %s\n", j + 1, buf);
+			ast_cli(a->fd, "=== --> Address %u: %s\n", j + 1, buf);
 		}
 
 	}

Modified: branches/12/res/res_jabber.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/res/res_jabber.c?view=diff&rev=419163&r1=419162&r2=419163
==============================================================================
--- branches/12/res/res_jabber.c (original)
+++ branches/12/res/res_jabber.c Tue Jul 22 09:13:14 2014
@@ -2627,7 +2627,7 @@
 			ASTOBJ_UNREF(buddy, ast_aji_buddy_destroy);
 		}
 	default:
-		ast_verb(5, "JABBER: This is a subcription of type %i\n", pak->subtype);
+		ast_verb(5, "JABBER: This is a subcription of type %u\n", pak->subtype);
 	}
 }
 

Modified: branches/12/res/res_mwi_external_ami.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/res/res_mwi_external_ami.c?view=diff&rev=419163&r1=419162&r2=419163
==============================================================================
--- branches/12/res/res_mwi_external_ami.c (original)
+++ branches/12/res/res_mwi_external_ami.c Tue Jul 22 09:13:14 2014
@@ -229,7 +229,7 @@
 	astman_append(s,
 		"Event: MWIGetComplete\r\n"
 		"EventList: Complete\r\n"
-		"ListItems: %d\r\n"
+		"ListItems: %u\r\n"
 		"%s"
 		"\r\n", count, id_text);
 

Modified: branches/12/tests/test_abstract_jb.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/tests/test_abstract_jb.c?view=diff&rev=419163&r1=419162&r2=419163
==============================================================================
--- branches/12/tests/test_abstract_jb.c (original)
+++ branches/12/tests/test_abstract_jb.c Tue Jul 22 09:13:14 2014
@@ -114,6 +114,15 @@
 	} } while (0)
 
 /*! \internal
+ * \brief Test two numeric (unsigned int) values.
+*/
+#define UINT_TEST(actual, expected) do { \
+	if ((actual) != (expected)) { \
+		ast_test_status_update(test, #actual ": expected [%u]; actual [%u]\n", (expected), (actual)); \
+		return AST_TEST_FAIL; \
+	} } while (0)
+
+/*! \internal
  * \brief Test two string values
 */
 #define STRING_TEST(actual, expected) do { \
@@ -126,7 +135,7 @@
  * \brief Verify that two frames have the same properties
  */
 #define VERIFY_FRAME(actual, expected) do { \
-	INT_TEST((actual)->frametype, (expected)->frametype); \
+	UINT_TEST((actual)->frametype, (expected)->frametype); \
 	INT_TEST((actual)->seqno, (expected)->seqno); \
 	LONG_INT_TEST((actual)->ts, (expected)->ts); \
 	LONG_INT_TEST((actual)->len, (expected)->len); \

Modified: branches/12/tests/test_aoc.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/tests/test_aoc.c?view=diff&rev=419163&r1=419162&r2=419163
==============================================================================
--- branches/12/tests/test_aoc.c (original)
+++ branches/12/tests/test_aoc.c Tue Jul 22 09:13:14 2014
@@ -411,7 +411,7 @@
 			if (!(unit = ast_aoc_get_unit_info(decoded, i)) ||
 				((unit->valid_amount) && (unit->amount != (i+1))) ||
 				((unit->valid_type) && (unit->type != (i+2)))) {
-				ast_test_status_update(test, "TEST 2, invalid unit entry result, got %d,%d, expected %d,%d\n",
+				ast_test_status_update(test, "TEST 2, invalid unit entry result, got %u,%u, expected %d,%d\n",
 					unit->amount,
 					unit->type,
 					i+1,

Modified: branches/12/tests/test_astobj2.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/tests/test_astobj2.c?view=diff&rev=419163&r1=419162&r2=419163
==============================================================================
--- branches/12/tests/test_astobj2.c (original)
+++ branches/12/tests/test_astobj2.c Tue Jul 22 09:13:14 2014
@@ -489,7 +489,7 @@
 		}
 	}
 
-	ast_test_status_update(test, "%s container created: buckets: %d, items: %d\n",
+	ast_test_status_update(test, "%s container created: buckets: %d, items: %u\n",
 		c_type, n_buckets, lim);
 
 	/* Testing ao2_container_clone */

Modified: branches/12/tests/test_astobj2_thrash.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/tests/test_astobj2_thrash.c?view=diff&rev=419163&r1=419162&r2=419163
==============================================================================
--- branches/12/tests/test_astobj2_thrash.c (original)
+++ branches/12/tests/test_astobj2_thrash.c Tue Jul 22 09:13:14 2014
@@ -82,7 +82,7 @@
 	if (keybuf == NULL) {
 		return NULL;
 	}
-	needed = snprintf(keybuf, buflen, "key%08x", i);
+	needed = snprintf(keybuf, buflen, "key%08x", (unsigned)i);
 	ast_atomic_fetchadd_int(&alloc_count, 1);
 	ast_assert(needed + 1 <= buflen);
 	return keybuf;

Modified: branches/12/tests/test_config.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/tests/test_config.c?view=diff&rev=419163&r1=419162&r2=419163
==============================================================================
--- branches/12/tests/test_config.c (original)
+++ branches/12/tests/test_config.c Tue Jul 22 09:13:14 2014
@@ -885,19 +885,19 @@
 	arr[3] = item_defaults;
 	/* Test global and item against configs, global_defaults and item_defaults against defaults */
 
-#define NOT_EQUAL_FAIL(field)  \
+#define NOT_EQUAL_FAIL(field, format)  \
 	if (arr[x]->field != control->field) { \
-		ast_test_status_update(test, "%s did not match: %d != %d with x = %d\n", #field, arr[x]->field, control->field, x); \
+		ast_test_status_update(test, "%s did not match: " format " != " format " with x = %d\n", #field, arr[x]->field, control->field, x); \
 		res = AST_TEST_FAIL; \
 	}
 	for (x = 0; x < 4; x++) {
 		struct test_item *control = x < 2 ? &configs : &defaults;
 
-		NOT_EQUAL_FAIL(intopt);
-		NOT_EQUAL_FAIL(uintopt);
-		NOT_EQUAL_FAIL(boolopt);
-		NOT_EQUAL_FAIL(flags);
-		NOT_EQUAL_FAIL(customopt);
+		NOT_EQUAL_FAIL(intopt, "%d");
+		NOT_EQUAL_FAIL(uintopt, "%u");
+		NOT_EQUAL_FAIL(boolopt, "%d");
+		NOT_EQUAL_FAIL(flags, "%u");
+		NOT_EQUAL_FAIL(customopt, "%d");
 		if (fabs(arr[x]->doubleopt - control->doubleopt) > 0.001) {
 			ast_test_status_update(test, "doubleopt did not match: %f vs %f on loop %d\n", arr[x]->doubleopt, control->doubleopt, x);
 			res = AST_TEST_FAIL;

Modified: branches/12/tests/test_event.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/tests/test_event.c?view=diff&rev=419163&r1=419162&r2=419163
==============================================================================
--- branches/12/tests/test_event.c (original)
+++ branches/12/tests/test_event.c Tue Jul 22 09:13:14 2014
@@ -58,7 +58,7 @@
 	/* Check #1: Ensure event type is set properly. */
 	type = ast_event_get_type(event);
 	if (ast_event_get_type(event) != type) {
-		ast_test_status_update(test, "Expected event type: '%d', got '%d'\n",
+		ast_test_status_update(test, "Expected event type: '%u', got '%u'\n",
 				expected_type, type);
 		return -1;
 	}

Modified: branches/12/tests/test_format_api.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/tests/test_format_api.c?view=diff&rev=419163&r1=419162&r2=419163
==============================================================================
--- branches/12/tests/test_format_api.c (original)
+++ branches/12/tests/test_format_api.c Tue Jul 22 09:13:14 2014
@@ -120,7 +120,7 @@
 			}
 			break;
 		default:
-			ast_log(LOG_WARNING, "unknown attribute type %d\n", key);
+			ast_log(LOG_WARNING, "unknown attribute type %u\n", key);
 		}
 	}
 }

Modified: branches/12/tests/test_hashtab_thrash.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/tests/test_hashtab_thrash.c?view=diff&rev=419163&r1=419162&r2=419163
==============================================================================
--- branches/12/tests/test_hashtab_thrash.c (original)
+++ branches/12/tests/test_hashtab_thrash.c Tue Jul 22 09:13:14 2014
@@ -83,7 +83,7 @@
 	if (keybuf == NULL) {
 		return NULL;
 	}
-	needed = snprintf(keybuf, buflen, "key%08x", i);
+	needed = snprintf(keybuf, buflen, "key%08x", (unsigned)i);
 	ast_assert(needed + 1 <= buflen);
 	return keybuf;
 }

Modified: branches/12/tests/test_json.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/tests/test_json.c?view=diff&rev=419163&r1=419162&r2=419163
==============================================================================
--- branches/12/tests/test_json.c (original)
+++ branches/12/tests/test_json.c Tue Jul 22 09:13:14 2014
@@ -85,7 +85,7 @@
 	ast_json_reset_alloc_funcs();
 	if (0 != alloc_count) {
 		ast_test_status_update(test,
-			"JSON test leaked %zd allocations!\n", alloc_count);
+			"JSON test leaked %zu allocations!\n", alloc_count);
 		return -1;
 	}
 	return 0;

Modified: branches/12/tests/test_logger.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/tests/test_logger.c?view=diff&rev=419163&r1=419162&r2=419163
==============================================================================
--- branches/12/tests/test_logger.c (original)
+++ branches/12/tests/test_logger.c Tue Jul 22 09:13:14 2014
@@ -55,12 +55,12 @@
 	unsigned int x;
 
 	for (x = 0; x < num_tests; x++) {
-		ast_cli(fd, "Test %d: %s\n", x + 1, tests[x].name);
-		ast_cli(fd, "\tExpected Successes: %d\n", tests[x].x_success);
-		ast_cli(fd, "\tExpected Failures: %d\n", tests[x].x_failure);
-		ast_cli(fd, "\tUnexpected Successes: %d\n", tests[x].u_success);
-		ast_cli(fd, "\tUnexpected Failures: %d\n", tests[x].u_failure);
-		ast_cli(fd, "Test %d Result: %s\n", x + 1, (tests[x].u_success + tests[x].u_failure) ? "FAIL" : "PASS");
+		ast_cli(fd, "Test %u: %s\n", x + 1, tests[x].name);
+		ast_cli(fd, "\tExpected Successes: %u\n", tests[x].x_success);
+		ast_cli(fd, "\tExpected Failures: %u\n", tests[x].x_failure);
+		ast_cli(fd, "\tUnexpected Successes: %u\n", tests[x].u_success);
+		ast_cli(fd, "\tUnexpected Failures: %u\n", tests[x].u_failure);
+		ast_cli(fd, "Test %u Result: %s\n", x + 1, (tests[x].u_success + tests[x].u_failure) ? "FAIL" : "PASS");
 	}
 }
 
@@ -88,11 +88,11 @@
 	}
 
 	for (test = 0; test < ARRAY_LEN(tests); test++) {
-		ast_cli(a->fd, "Test %d: %s.\n", test + 1, tests[test].name);
+		ast_cli(a->fd, "Test %u: %s.\n", test + 1, tests[test].name);
 		switch (test) {
 		case 0:
 			if ((level = ast_logger_register_level("test")) != -1) {
-				ast_cli(a->fd, "Test: got level %d\n", level);
+				ast_cli(a->fd, "Test: got level %u\n", level);
 				ast_log_dynamic_level(level, "Logger Dynamic Test: Test 1\n");
 				ast_logger_unregister_level("test");
 				tests[test].x_success++;
@@ -106,7 +106,7 @@
 			char level_name[18][8];
 
 			for (x = 0; x < ARRAY_LEN(level_name); x++) {
-				sprintf(level_name[x], "level%02d", x);
+				sprintf(level_name[x], "level%02u", x);
 				if ((level = ast_logger_register_level(level_name[x])) == -1) {
 					if (x < 16) {
 						tests[test].u_failure++;
@@ -115,7 +115,7 @@
 					}
 					level_name[x][0] = '\0';
 				} else {
-					ast_cli(a->fd, "Test: registered '%s', got level %d\n", level_name[x], level);
+					ast_cli(a->fd, "Test: registered '%s', got level %u\n", level_name[x], level);
 					if (x < 16) {
 						tests[test].x_success++;
 					} else {
@@ -159,7 +159,7 @@
 	}
 
 	for (test = 0; test < ARRAY_LEN(tests); test++) {
-		ast_cli(a->fd, "Test %d: %s.\n", test + 1, tests[test].name);
+		ast_cli(a->fd, "Test %u: %s.\n", test + 1, tests[test].name);
 		switch (test) {
 		case 0:
 			if ((level = ast_logger_register_level("perftest")) != -1) {
@@ -167,7 +167,7 @@
 				struct timeval start, end;
 				int elapsed;
 
-				ast_cli(a->fd, "Test: got level %d\n", level);
+				ast_cli(a->fd, "Test: got level %u\n", level);
 				start = ast_tvnow();
 				for (x = 0; x < 10000; x++) {
 					ast_log_dynamic_level(level, "Performance test log message\n");

Modified: branches/12/tests/test_optional_api.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/tests/test_optional_api.c?view=diff&rev=419163&r1=419162&r2=419163
==============================================================================
--- branches/12/tests/test_optional_api.c (original)
+++ branches/12/tests/test_optional_api.c Tue Jul 22 09:13:14 2014
@@ -99,7 +99,7 @@
 	test_optional();
 
 	if (was_called_result != IMPL) {
-		ast_test_status_update(test, "Expected %d, was %d",
+		ast_test_status_update(test, "Expected %d, was %u",
 			IMPL, was_called_result);
 		goto done;
 	}
@@ -135,7 +135,7 @@
 
 	test_optional();
 	if (was_called_result != STUB) {
-		ast_test_status_update(test, "Expected %d, was %d",
+		ast_test_status_update(test, "Expected %d, was %u",
 			STUB, was_called_result);
 		goto done;
 	}
@@ -144,7 +144,7 @@
 
 	test_optional();
 	if (was_called_result != IMPL) {
-		ast_test_status_update(test, "Expected %d, was %d",
+		ast_test_status_update(test, "Expected %d, was %u",
 			IMPL, was_called_result);
 		ast_optional_api_unprovide(SYMNAME, test_optional_impl);
 		goto done;
@@ -154,7 +154,7 @@
 
 	test_optional();
 	if (was_called_result != STUB) {
-		ast_test_status_update(test, "Expected %d, was %d",
+		ast_test_status_update(test, "Expected %d, was %u",
 			STUB, was_called_result);
 		ast_optional_api_unprovide(SYMNAME, test_optional_impl);
 		goto done;

Modified: branches/12/tests/test_sorcery.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/tests/test_sorcery.c?view=diff&rev=419163&r1=419162&r2=419163
==============================================================================
--- branches/12/tests/test_sorcery.c (original)
+++ branches/12/tests/test_sorcery.c Tue Jul 22 09:13:14 2014
@@ -2906,7 +2906,7 @@
 	}
 	if (strcmp(ast_str_buffer(buf), "5")) {
 		ast_free(buf);
-		ast_test_status_update(test, "Failed retrieve field.  Got '%d', should be '5'\n", obj->bob);
+		ast_test_status_update(test, "Failed retrieve field.  Got '%u', should be '5'\n", obj->bob);
 		return AST_TEST_FAIL;
 	}
 
@@ -2919,7 +2919,7 @@
 	}
 	if (strcmp(ast_str_buffer(buf), "5")) {
 		ast_free(buf);
-		ast_test_status_update(test, "Failed retrieve field.  Got '%d', should be '5'\n", obj->bob);
+		ast_test_status_update(test, "Failed retrieve field.  Got '%u', should be '5'\n", obj->bob);
 		return AST_TEST_FAIL;
 	}
 

Modified: branches/12/tests/test_sorcery_realtime.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/tests/test_sorcery_realtime.c?view=diff&rev=419163&r1=419162&r2=419163
==============================================================================
--- branches/12/tests/test_sorcery_realtime.c (original)
+++ branches/12/tests/test_sorcery_realtime.c Tue Jul 22 09:13:14 2014
@@ -790,11 +790,11 @@
 	}
 
 	if (obj->bob != 42) {
-		ast_test_status_update(test, "Object's 'bob' field does not have expected value: %d != 42\n",
+		ast_test_status_update(test, "Object's 'bob' field does not have expected value: %u != 42\n",
 				obj->bob);
 		return AST_TEST_FAIL;
 	} else if (obj->joe != 93) {
-		ast_test_status_update(test, "Object's 'joe' field does not have expected value: %d != 93\n",
+		ast_test_status_update(test, "Object's 'joe' field does not have expected value: %u != 93\n",
 				obj->joe);
 		return AST_TEST_FAIL;
 	}
@@ -844,11 +844,11 @@
 	}
 
 	if (obj->bob != 42) {
-		ast_test_status_update(test, "Object's 'bob' field does not have expected value: %d != 42\n",
+		ast_test_status_update(test, "Object's 'bob' field does not have expected value: %u != 42\n",
 				obj->bob);
 		return AST_TEST_FAIL;
 	} else if (obj->joe != 93) {
-		ast_test_status_update(test, "Object's 'joe' field does not have expected value: %d != 93\n",
+		ast_test_status_update(test, "Object's 'joe' field does not have expected value: %u != 93\n",
 				obj->joe);
 		return AST_TEST_FAIL;
 	}

Modified: branches/12/tests/test_voicemail_api.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/tests/test_voicemail_api.c?view=diff&rev=419163&r1=419162&r2=419163
==============================================================================
--- branches/12/tests/test_voicemail_api.c (original)
+++ branches/12/tests/test_voicemail_api.c Tue Jul 22 09:13:14 2014
@@ -129,7 +129,7 @@
  */
 #define VM_API_INT_VERIFY(expected, actual) do { \
 	if ((expected) != (actual)) { \
-		ast_test_status_update(test, "Test failed for parameter %s: Expected [%d], Actual [%d]\n", #actual, expected, actual); \
+		ast_test_status_update(test, "Test failed for parameter %s: Expected [%d], Actual [%d]\n", #actual, (int)expected, (int)actual); \
 		VM_API_SNAPSHOT_TEST_CLEANUP; \
 		return AST_TEST_FAIL; \
 	} } while (0)
@@ -457,9 +457,9 @@
 	 */
 	snprintf(folder_path, sizeof(folder_path), "%s/voicemail/%s/%s/%s",
 		ast_config_AST_SPOOL_DIR, context, mailbox, snapshot->folder_name);
-	snprintf(msg_path, sizeof(msg_path), "%s/msg%04d.txt",
+	snprintf(msg_path, sizeof(msg_path), "%s/msg%04u.txt",
 		folder_path, snapshot->msg_number);
-	snprintf(snd_path, sizeof(snd_path), "%s/msg%04d.gsm",
+	snprintf(snd_path, sizeof(snd_path), "%s/msg%04u.gsm",
 		folder_path, snapshot->msg_number);
 	snprintf(beep_path, sizeof(beep_path), "%s/sounds/en/beep.gsm", ast_config_AST_VAR_DIR);
 
@@ -548,9 +548,9 @@
 	snprintf(folder_path, sizeof(folder_path), "%s/voicemail/%s/%s/%s",
 		ast_config_AST_SPOOL_DIR, "default", snapshot->exten, snapshot->folder_name);
 
-	snprintf(msg_path, sizeof(msg_path), "%s/msg%04d.txt",
+	snprintf(msg_path, sizeof(msg_path), "%s/msg%04u.txt",
 			folder_path, snapshot->msg_number);
-	snprintf(snd_path, sizeof(snd_path), "%s/msg%04d.gsm",
+	snprintf(snd_path, sizeof(snd_path), "%s/msg%04u.gsm",
 			folder_path, snapshot->msg_number);
 	unlink(msg_path);
 	unlink(snd_path);




More information about the svn-commits mailing list