From 160e74bb9eb78be7b4c19802cf1a1c83e389d4ba Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Tue, 12 Apr 2022 08:30:08 +0200 Subject: [PATCH] BUILD/DEBUG: hpack-tbl: fix format string in standalone debug code In issue #1184, cppcheck reports that an incorrect format "%d" was used to print an unsigned in the debug code, though values are always very small and this will never be an issue. --- src/hpack-tbl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hpack-tbl.c b/src/hpack-tbl.c index 8df10319a..990d2f7dd 100644 --- a/src/hpack-tbl.c +++ b/src/hpack-tbl.c @@ -111,7 +111,7 @@ void hpack_dht_dump(FILE *out, const struct hpack_dht *dht) for (i = HPACK_SHT_SIZE; i < HPACK_SHT_SIZE + dht->used; i++) { slot = (hpack_get_dte(dht, i - HPACK_SHT_SIZE + 1) - dht->dte); - fprintf(out, "idx=%d slot=%u name=<%s> value=<%s> addr=%u-%u\n", + fprintf(out, "idx=%u slot=%u name=<%s> value=<%s> addr=%u-%u\n", i, slot, istpad(name, hpack_idx_to_name(dht, i)).ptr, istpad(value, hpack_idx_to_value(dht, i)).ptr,