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 <inttypes.h>, but rather cast it to long long.
Also cast length to int in order to prevent similar issues in the
future.
/* 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) \