From: Amaury Denoyelle Date: Fri, 10 Feb 2023 08:25:22 +0000 (+0100) Subject: BUG/MINOR: quic: fix type bug on "show quic" for 32-bits arch X-Git-Tag: v2.8-dev4~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a9de25a5598549dff32f4097f461ecbde311dc8f;p=thirdparty%2Fhaproxy.git 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. --- diff --git a/src/quic_conn.c b/src/quic_conn.c index c93484ca69..bf272c14fa 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");