From 3b757485428bc56e8776cca2edf243b042712800 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Tue, 12 Apr 2022 08:39:33 +0200 Subject: [PATCH] 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. --- src/hpack-dec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hpack-dec.c b/src/hpack-dec.c index 4fa9bfd08..6e4a8b74a 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; }