From: Ilya Leoshkevich Date: Tue, 21 Jul 2020 11:18:10 +0000 (+0200) Subject: send_bits_trace: placate -Wformat X-Git-Tag: 1.9.9-b1~71 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1d2504ddc489;p=thirdparty%2Fzlib-ng.git 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. --- 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) \