]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD/DEBUG: hpack: use unsigned int in printf format in debug code
authorWilly Tarreau <w@1wt.eu>
Tue, 12 Apr 2022 06:39:33 +0000 (08:39 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 12 Apr 2022 06:40:38 +0000 (08:40 +0200)
In issue #1184 cppcheck found that the debug code incorrectly uses %d
to print an unsigned value.

src/hpack-dec.c

index 4fa9bfd08298de56448be19f67850a9625abeaa2..6e4a8b74a1fa63d92092582c38037ff402a84295 100644 (file)
@@ -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;
                        }