From dfd6e9d757670c41bdda3bc895829d6080962322 Mon Sep 17 00:00:00 2001 From: Michael Jeanson Date: Wed, 16 Mar 2022 14:18:36 -0400 Subject: [PATCH] Clean-up: fix '-Wformat' warnings on various platforms MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Change-Id: I39a2dd8bb4f1f6654a65f9fab8d5ac74439a4410 Signed-off-by: Michael Jeanson Signed-off-by: Jérémie Galarneau --- tests/utils/testapp/gen-ns-events/gen-ns-events.cpp | 5 +++-- tests/utils/testapp/gen-ust-events-ns/gen-ust-events-ns.cpp | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/utils/testapp/gen-ns-events/gen-ns-events.cpp b/tests/utils/testapp/gen-ns-events/gen-ns-events.cpp index 6afd855da..7ecf22b35 100644 --- a/tests/utils/testapp/gen-ns-events/gen-ns-events.cpp +++ b/tests/utils/testapp/gen-ns-events/gen-ns-events.cpp @@ -18,6 +18,7 @@ #include #include #include +#include #include #include @@ -132,7 +133,7 @@ static int do_the_needful(int ns_flag, const char *ns_str) ret = -1; goto end; } - debug_printf("Initial %s ns inode number: %lu\n", ns_str, ns1); + debug_printf("Initial %s ns inode number: %" PRIuMAX "\n", ns_str, (uintmax_t) ns1); /* Wait on synchronization before unshare. */ if (before_unshare_wait_file_path) { @@ -155,7 +156,7 @@ static int do_the_needful(int ns_flag, const char *ns_str) ret = -1; goto end; } - debug_printf("Post unshare %s ns inode number: %lu\n", ns_str, ns2); + debug_printf("Post unshare %s ns inode number: %" PRIuMAX "\n", ns_str, (uintmax_t) ns2); /* Signal that the unshare call is completed. */ if (after_unshare_signal_file_path) { diff --git a/tests/utils/testapp/gen-ust-events-ns/gen-ust-events-ns.cpp b/tests/utils/testapp/gen-ust-events-ns/gen-ust-events-ns.cpp index c916a9616..84d8bf563 100644 --- a/tests/utils/testapp/gen-ust-events-ns/gen-ust-events-ns.cpp +++ b/tests/utils/testapp/gen-ust-events-ns/gen-ust-events-ns.cpp @@ -17,6 +17,7 @@ #include #include #include +#include #include #include @@ -133,7 +134,7 @@ static int do_the_needful(int ns_flag, const char *ns_str) ret = -1; goto end; } - debug_printf("Initial %s ns inode number: %lu\n", ns_str, ns1); + debug_printf("Initial %s ns inode number: %" PRIuMAX "\n", ns_str, (uintmax_t) ns1); for (i = 0; nr_iter < 0 || i < nr_iter; i++) { tracepoint(tp, tptest, ns1); @@ -155,7 +156,7 @@ static int do_the_needful(int ns_flag, const char *ns_str) ret = -1; goto end; } - debug_printf("Post unshare %s ns inode number: %lu\n", ns_str, ns2); + debug_printf("Post unshare %s ns inode number: %" PRIuMAX "\n", ns_str, (uintmax_t) ns2); /* * Signal that we emited the first event group and that the -- 2.34.1