From 1d2504ddc4894786fdf61d41a9bfa435cd8b1935 Mon Sep 17 00:00:00 2001 From: Ilya Leoshkevich Date: Tue, 21 Jul 2020 13:18:10 +0200 Subject: [PATCH] send_bits_trace: placate -Wformat value, which can be uint64_t, is printed using %llx, which, strictly speaking, is not correct, and triggers -Wformat. Since we don't really know what type value can have (send_bits_trace is a macro), don't use , but rather cast it to long long. Also cast length to int in order to prevent similar issues in the future. --- trees_emit.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trees_emit.h b/trees_emit.h index 512429f3..dfce22bf 100644 --- a/trees_emit.h +++ b/trees_emit.h @@ -24,7 +24,7 @@ extern ZLIB_INTERNAL const int base_dist[D_CODES]; /* Bit buffer and deflate code stderr tracing */ #ifdef ZLIB_DEBUG # define send_bits_trace(s, value, length) { \ - Tracevv((stderr, " l %2d v %4llx ", length, value)); \ + Tracevv((stderr, " l %2d v %4llx ", (int)(length), (long long)(value))); \ Assert(length > 0 && length <= BIT_BUF_SIZE, "invalid length"); \ } # define send_code_trace(s, c) \ -- 2.47.2