[asterisk-commits] dlee: trunk r396559 - /trunk/tests/test_hashtab_thrash.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Aug 13 09:57:37 CDT 2013


Author: dlee
Date: Tue Aug 13 09:57:34 2013
New Revision: 396559

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=396559
Log:
Fix build warnings when printf a tv_usec.

The debug logs added in r396528 neglected to account for suseconds_t
being an int.

See r392076 for more info.


Modified:
    trunk/tests/test_hashtab_thrash.c

Modified: trunk/tests/test_hashtab_thrash.c
URL: http://svnview.digium.com/svn/asterisk/trunk/tests/test_hashtab_thrash.c?view=diff&rev=396559&r1=396558&r2=396559
==============================================================================
--- trunk/tests/test_hashtab_thrash.c (original)
+++ trunk/tests/test_hashtab_thrash.c Tue Aug 13 09:57:34 2013
@@ -66,9 +66,10 @@
 	struct timeval now = ast_tvnow();
 	int val = ast_tvdiff_us(data->deadline, now) < 0;
 	if (val) {
+		/* tv_usec is suseconds_t, which could be int or long */
 		ast_test_status_update(data->test, "Now: %ld.%06ld Deadline: %ld.%06ld\n",
 			now.tv_sec, now.tv_usec,
-			data->deadline.tv_sec, data->deadline.tv_usec);
+			data->deadline.tv_sec, (long)data->deadline.tv_usec);
 	}
 	return val;
 }




More information about the asterisk-commits mailing list