[PATCH 6/7] tests: Print size argument of sched_setattr as unsigned

Eugene Syromyatnikov evgsyr at gmail.com
Tue Sep 6 02:08:58 UTC 2016


Since it is how it is declared.

* tests/sched_xetattr.c: Cast size of struct sched_attr to unsigned,
  update format specifier accordingly.
---
 tests/sched_xetattr.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/sched_xetattr.c b/tests/sched_xetattr.c
index 2e0ce61..9ff8c72 100644
--- a/tests/sched_xetattr.c
+++ b/tests/sched_xetattr.c
@@ -54,7 +54,7 @@ main(void)
 	printf("sched_getattr\\(0, \\{size=%u, sched_policy=SCHED_[A-Z]+, "
 		"sched_flags=%s, sched_nice=%d, sched_priority=%u, "
 		"sched_runtime=%" PRIu64 ", sched_deadline=%" PRIu64 ", "
-		"sched_period=%" PRIu64 "\\}, %zu, 0\\) += 0\n",
+		"sched_period=%" PRIu64 "\\}, %u, 0\\) += 0\n",
 		sched_attr->size,
 		sched_attr->sched_flags ? "SCHED_FLAG_RESET_ON_FORK" : "0",
 		sched_attr->sched_nice,
@@ -62,7 +62,7 @@ main(void)
 		sched_attr->sched_runtime,
 		sched_attr->sched_deadline,
 		sched_attr->sched_period,
-		sizeof(*sched_attr));
+		(unsigned)sizeof(*sched_attr));
 
 	sched_attr->sched_flags |= 1;
 	if (syscall(__NR_sched_setattr, 0, sched_attr, 0))
-- 
1.7.10.4





More information about the Strace-devel mailing list