]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUILD: quic: 32bits build broken by wrong integer conversions for printf()
authorFrederic Lecaille <flecaille@haproxy.com>
Mon, 26 Aug 2024 09:18:15 +0000 (11:18 +0200)
committerFrederic Lecaille <flecaille@haproxy.com>
Mon, 26 Aug 2024 09:21:48 +0000 (11:21 +0200)
commit414e3aa6bc80d66a448dc25d8e50f4e457dc8711
tree5c139630eab28498ff1df5a4845a2c24615330a0
parent4256961a4421b55e5a66440bbd732fa02d8df5b0
BUILD: quic: 32bits build broken by wrong integer conversions for printf()

Since these commits the 32bits build is broken due to several errors as follow:

CC      src/quic_cli.o
src/quic_cli.c: In function ‘dump_quic_full’:
src/quic_cli.c:285:94: error: format ‘%ld’ expects argument of type ‘long int’,
        but argument 5 has type ‘uint64_t’ {aka ‘long long unsigned int’} [-Werror=format=]
  285 |                         chunk_appendf(&trash, "  [initl] rx.ackrng=%-6zu tx.inflight=%-6zu(%ld%%)\n",
      |                                                                                            ~~^
      |                                                                                              |
      |                                                                                              long int
      |                                                                                            %lld
  286 |                                       pktns->rx.arngs.sz, pktns->tx.in_flight,
  287 |                                       pktns->tx.in_flight * 100 / qc->path->cwnd);
      |                                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                                                 |
      |                                                                 uint64_t {aka long long unsigned int}

Replace several %ld by %llu with ull as printf conversion in quic_clic.c and a
%ld by %lld with (long long) as printf conversion in quic_cc_cubic.c.

Thank you to Ilya (@chipitsine) for having reported this issue in GH #2689.

Must be backported to 3.0.
src/quic_cc_cubic.c
src/quic_cli.c