From: Michael Jeanson Date: Wed, 16 Mar 2022 18:18:36 +0000 (-0400) Subject: Clean-up: fix '-Wformat' warnings on various platforms X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=dfd6e9d757670c41bdda3bc895829d6080962322;p=deliverable%2Flttng-tools.git Clean-up: fix '-Wformat' warnings on various platforms Change-Id: I39a2dd8bb4f1f6654a65f9fab8d5ac74439a4410 Signed-off-by: Michael Jeanson Signed-off-by: Jérémie Galarneau --- 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