[PATCH 8/9] tests: min_nr and nr arguments in io_getevents should be long

Eugene Syromyatnikov evgsyr at gmail.com
Mon Sep 5 01:32:40 UTC 2016


* aio.c (main): change output format for min_nr and nr arguments in
  io_getevents check to %ld, cast arguments to long.
---
 tests/aio.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/aio.c b/tests/aio.c
index 5a023cf..8c5bfa7 100644
--- a/tests/aio.c
+++ b/tests/aio.c
@@ -166,11 +166,11 @@ main(void)
 	       nr);
 
 	assert(syscall(__NR_io_getevents, *ctx, nr, nr + 1, ev, ts) == (long) nr);
-	printf("io_getevents(%lu, %u, %u, ["
+	printf("io_getevents(%lu, %ld, %ld, ["
 		"{data=%#llx, obj=%p, res=%u, res2=0}, "
 		"{data=%#llx, obj=%p, res=%u, res2=0}"
 		"], {0, 123456789}) = %u\n",
-	       *ctx, nr, nr + 1,
+	       *ctx, (long) nr, (long) (nr + 1),
 	       (unsigned long long) cb[0].aio_data, &cb[0], sizeof_data0,
 	       (unsigned long long) cb[1].aio_data, &cb[1], sizeof_data1,
 	       nr);
-- 
1.7.10.4





More information about the Strace-devel mailing list