From: Willy Tarreau Date: Tue, 12 Apr 2022 06:39:33 +0000 (+0200) Subject: BUILD/DEBUG: hpack: use unsigned int in printf format in debug code X-Git-Tag: v2.6-dev6~115 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3b757485428bc56e8776cca2edf243b042712800;p=thirdparty%2Fhaproxy.git BUILD/DEBUG: hpack: use unsigned int in printf format in debug code In issue #1184 cppcheck found that the debug code incorrectly uses %d to print an unsigned value. --- diff --git a/src/hpack-dec.c b/src/hpack-dec.c index 4fa9bfd082..6e4a8b74a1 100644 --- a/src/hpack-dec.c +++ b/src/hpack-dec.c @@ -166,7 +166,7 @@ int hpack_decode_frame(struct hpack_dht *dht, const uint8_t *raw, uint32_t len, if (*raw >= 0x80) { /* indexed header field */ if (*raw == 0x80) { - hpack_debug_printf("unhandled code 0x%02x (raw=%p, len=%d)\n", *raw, raw, len); + hpack_debug_printf("unhandled code 0x%02x (raw=%p, len=%u)\n", *raw, raw, len); ret = -HPACK_ERR_UNKNOWN_OPCODE; goto leave; }