Re: [PATCH] perf trace: avoid garbage when not printing an trace event's arguments
From: Benjamin Peterson
Date: Fri Nov 01 2024 - 13:27:08 EST
On Thu, Oct 31, 2024 at 7:03 PM Howard Chu <howardchu95@xxxxxxxxx> wrote:
>
> Hello Benjamin,
>
> It does not build on my system due to this warning:
>
> builtin-trace.c: In function ‘trace__fprintf_tp_fields’:
> builtin-trace.c:3090:35: error: field precision specifier ‘.*’ expects
> argument of type ‘int’, but argument 3 has type ‘size_t’ {aka ‘long
> unsigned int’} [-Werror=format=]
> 3090 | fprintf(trace->output, "%.*s", printed, bf);
> | ~~^~ ~~~~~~~
> | | |
> | int size_t {aka long unsigned int}
Thanks; that's what I getting for building with clang rather than gcc.
v2 incoming...