From a9de25a5598549dff32f4097f461ecbde311dc8f Mon Sep 17 00:00:00 2001 From: Amaury Denoyelle Date: Fri, 10 Feb 2023 09:25:22 +0100 Subject: [PATCH] BUG/MINOR: quic: fix type bug on "show quic" for 32-bits arch Incorrect printf format specifier "%lu" was used on "show quic" handler for uint64_t. This breaks build on 32-bits architecture. To fix this portability issue, force an explicit cast to unsigned long long with "%llu" specifier. This must be backported up to 2.7. --- src/quic_conn.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/quic_conn.c b/src/quic_conn.c index c93484ca6..bf272c14f 100644 --- a/src/quic_conn.c +++ b/src/quic_conn.c @@ -7788,8 +7788,10 @@ static int cli_io_handler_dump_quic(struct appctx *appctx) stream = eb64_entry(node, struct qc_stream_desc, by_id); node = eb64_next(node); - chunk_appendf(&trash, " | stream=%-8llu", (long long unsigned int)stream->by_id.key); - chunk_appendf(&trash, " off=%-8lu ack=%-8lu", stream->buf_offset, stream->ack_offset); + chunk_appendf(&trash, " | stream=%-8llu", (unsigned long long)stream->by_id.key); + chunk_appendf(&trash, " off=%-8llu ack=%-8llu", + (unsigned long long)stream->buf_offset, + (unsigned long long)stream->ack_offset); if (!(++i % 3)) { chunk_appendf(&trash, "\n");