Clean-up: fix '-Wformat' warnings on various platforms
authorMichael Jeanson <mjeanson@efficios.com>
Wed, 16 Mar 2022 18:18:36 +0000 (14:18 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 17 Mar 2022 17:20:01 +0000 (13:20 -0400)
Change-Id: I39a2dd8bb4f1f6654a65f9fab8d5ac74439a4410
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
tests/utils/testapp/gen-ns-events/gen-ns-events.cpp
tests/utils/testapp/gen-ust-events-ns/gen-ust-events-ns.cpp

index 6afd855da1d0c986e2bbdc6e7e07b721e653b07f..7ecf22b358859b33f56c686ff9d60ed701679663 100644 (file)
@@ -18,6 +18,7 @@
 #include <sys/stat.h>
 #include <sys/types.h>
 #include <unistd.h>
+#include <inttypes.h>
 
 #include <common/compat/tid.h>
 #include <common/macros.h>
@@ -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) {
index c916a961611c3d1f7aeae903c7f46190432f552c..84d8bf563b06599440a07d3503889ad63099ecc1 100644 (file)
@@ -17,6 +17,7 @@
 #include <sys/stat.h>
 #include <sys/types.h>
 #include <unistd.h>
+#include <inttypes.h>
 
 #include <common/compat/tid.h>
 #include <common/macros.h>
@@ -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
This page took 0.027861 seconds and 4 git commands to generate.