X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=tests%2Futils%2Ftestapp%2Fgen-ust-events-ns%2Fgen-ust-events-ns.cpp;h=ba506b1131b57eeb1e2f8313e16dc90546ba5d60;hb=c9e313bc594f40a86eed237dce222c0fc99c957f;hp=dadfc3d3a00301bc81ba044ef19403585812ccda;hpb=729c1fec5976af17fded2f026725a08ef1924290;p=lttng-tools.git 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 dadfc3d3a..ba506b113 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,10 +17,12 @@ #include #include #include +#include -#include +#include +#include -#include "signal-helper.h" +#include "signal-helper.hpp" #include "utils.h" #define TRACEPOINT_DEFINE @@ -77,7 +79,8 @@ struct poptOption opts[] = { { NULL, 0, 0, NULL, 0 } }; -static void debug_printf(const char *format, ...) +static ATTR_FORMAT_PRINTF(1, 2) +void debug_printf(const char *format, ...) { va_list args; va_start(args, format); @@ -131,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); @@ -153,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