summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2014-06-13 12:17:08 +0400
committerIvan Maidanski <ivmai@mail.ru>2014-06-13 12:17:08 +0400
commitb1e38be3cb8a957b014b64dd0e515fadbd198c9f (patch)
tree8459f418db655c9e81bed90900a54a27962f013c /tests
parentc69cdc9cc4b134080660f97118d124ef073a493a (diff)
downloadlibatomic_ops-b1e38be3cb8a957b014b64dd0e515fadbd198c9f.tar.gz
Fix missing casts to match printf format specifier in test_atomic
* tests/test_atomic.c (test_and_set_thr): Add missing casts to long for locked_counter (which is unsigned long) to match printf format specifier.
Diffstat (limited to 'tests')
-rw-r--r--tests/test_atomic.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/test_atomic.c b/tests/test_atomic.c
index 86fede1..b063a92 100644
--- a/tests/test_atomic.c
+++ b/tests/test_atomic.c
@@ -148,7 +148,7 @@ void * test_and_set_thr(void * id)
if (locked_counter != 1)
{
fprintf(stderr, "Test and set failure 1, counter = %ld, id = %d\n",
- locked_counter, (int)(AO_PTRDIFF_T)id);
+ (long)locked_counter, (int)(AO_PTRDIFF_T)id);
abort();
}
locked_counter *= 2;
@@ -158,7 +158,7 @@ void * test_and_set_thr(void * id)
if (locked_counter != 1)
{
fprintf(stderr, "Test and set failure 2, counter = %ld, id = %d\n",
- locked_counter, (int)(AO_PTRDIFF_T)id);
+ (long)locked_counter, (int)(AO_PTRDIFF_T)id);
abort();
}
--locked_counter;