[asterisk-commits] twilson: branch 1.8 r323672 - /branches/1.8/tests/test_db.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Jun 15 12:09:58 CDT 2011


Author: twilson
Date: Wed Jun 15 12:09:51 2011
New Revision: 323672

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=323672
Log:
Cast ARRAY_LEN to size_t for ast_logging

32-bit and 64-bit machines return different types for ARRAY_LEN(), so cast
it before using in a format string.

Modified:
    branches/1.8/tests/test_db.c

Modified: branches/1.8/tests/test_db.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/tests/test_db.c?view=diff&rev=323672&r1=323671&r2=323672
==============================================================================
--- branches/1.8/tests/test_db.c (original)
+++ branches/1.8/tests/test_db.c Wed Jun 15 12:09:51 2011
@@ -193,12 +193,12 @@
 	ast_db_freetree(dbes);
 
 	if ((num_deleted = ast_db_deltree(BASE, SUB2)) != ARRAY_LEN(inputs) / 2) {
-		ast_test_status_update(test, "Failed to deltree %s/%s, expected %lu deletions and got %d\n", BASE, SUB2, ARRAY_LEN(inputs) / 2, num_deleted);
+		ast_test_status_update(test, "Failed to deltree %s/%s, expected %zu deletions and got %d\n", BASE, SUB2, (size_t) ARRAY_LEN(inputs) / 2, num_deleted);
 		res = AST_TEST_FAIL;
 	}
 
 	if ((num_deleted = ast_db_deltree(BASE, NULL)) != ARRAY_LEN(inputs) / 2) {
-		ast_test_status_update(test, "Failed to deltree %s, expected %lu deletions and got %d\n", BASE, ARRAY_LEN(inputs) / 2, num_deleted);
+		ast_test_status_update(test, "Failed to deltree %s, expected %zu deletions and got %d\n", BASE, (size_t) ARRAY_LEN(inputs) / 2, num_deleted);
 		res = AST_TEST_FAIL;
 	}
 




More information about the asterisk-commits mailing list