From: Arnaldo Carvalho de Melo The offset ignored in btf_encoder__encode_cu_variables() is a uint64_t, printed with %zu. That matches on 64-bit, where size_t is also 64-bit, but on 32-bit x86 uint64_t is unsigned long long and gcc rejects it: btf_encoder.c:2893:88: error: format '%zu' expects argument of type 'size_t', but argument 4 has type 'uint64_t' [-Werror=format=] which breaks a Debug (-Werror) build on i386 since that check was added. Use PRIu64, inttypes.h is already included. Fixes: 5b5238c0aaff1dfd ("btf_encoder: Explicitly check addr/size for u32 overflow") Cc: Alan Maguire Cc: Stephen Brennan Cc: Jiri Olsa Signed-off-by: Arnaldo Carvalho de Melo --- btf_encoder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/btf_encoder.c b/btf_encoder.c index 85376281da076cb2..ca102eb194b80f8d 100644 --- a/btf_encoder.c +++ b/btf_encoder.c @@ -2890,7 +2890,7 @@ static int btf_encoder__encode_cu_variables(struct btf_encoder *encoder) } if (addr > UINT32_MAX) { if (encoder->verbose) - fprintf(stderr, "Ignoring variable '%s' - its offset %zu doesn't fit in a u32\n", + fprintf(stderr, "Ignoring variable '%s' - its offset %" PRIu64 " doesn't fit in a u32\n", name, addr); continue; } -- 2.56.0