mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-07 15:47:01 +02:00
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.
This commit is contained in:
parent
4256961a44
commit
414e3aa6bc
@ -667,9 +667,9 @@ static void quic_cc_cubic_state_cli(struct buffer *buf, const struct quic_cc_pat
|
|||||||
{
|
{
|
||||||
struct cubic *c = quic_cc_priv(&path->cc);
|
struct cubic *c = quic_cc_priv(&path->cc);
|
||||||
|
|
||||||
chunk_appendf(buf, " cc: state=%s ssthresh=%u K=%u last_w_max=%u wdiff=%ld\n",
|
chunk_appendf(buf, " cc: state=%s ssthresh=%u K=%u last_w_max=%u wdiff=%lld\n",
|
||||||
quic_cc_state_str(c->state), c->ssthresh, c->K, c->last_w_max,
|
quic_cc_state_str(c->state), c->ssthresh, c->K, c->last_w_max,
|
||||||
(int64_t)(path->cwnd - c->last_w_max));
|
(long long)(path->cwnd - c->last_w_max));
|
||||||
}
|
}
|
||||||
|
|
||||||
struct quic_cc_algo quic_cc_algo_cubic = {
|
struct quic_cc_algo quic_cc_algo_cubic = {
|
||||||
|
@ -282,23 +282,23 @@ static void dump_quic_full(struct show_quic_ctx *ctx, struct quic_conn *qc)
|
|||||||
if (ctx->fields & QUIC_DUMP_FLD_PKTNS) {
|
if (ctx->fields & QUIC_DUMP_FLD_PKTNS) {
|
||||||
pktns = qc->ipktns;
|
pktns = qc->ipktns;
|
||||||
if (pktns) {
|
if (pktns) {
|
||||||
chunk_appendf(&trash, " [initl] rx.ackrng=%-6zu tx.inflight=%-6zu(%ld%%)\n",
|
chunk_appendf(&trash, " [initl] rx.ackrng=%-6zu tx.inflight=%-6zu(%llu%%)\n",
|
||||||
pktns->rx.arngs.sz, pktns->tx.in_flight,
|
pktns->rx.arngs.sz, pktns->tx.in_flight,
|
||||||
pktns->tx.in_flight * 100 / qc->path->cwnd);
|
(ull)pktns->tx.in_flight * 100 / qc->path->cwnd);
|
||||||
}
|
}
|
||||||
|
|
||||||
pktns = qc->hpktns;
|
pktns = qc->hpktns;
|
||||||
if (pktns) {
|
if (pktns) {
|
||||||
chunk_appendf(&trash, " [hndshk] rx.ackrng=%-6zu tx.inflight=%-6zu(%ld%%)\n",
|
chunk_appendf(&trash, " [hndshk] rx.ackrng=%-6zu tx.inflight=%-6zu(%llu%%)\n",
|
||||||
pktns->rx.arngs.sz, pktns->tx.in_flight,
|
pktns->rx.arngs.sz, pktns->tx.in_flight,
|
||||||
pktns->tx.in_flight * 100 / qc->path->cwnd);
|
(ull)pktns->tx.in_flight * 100 / qc->path->cwnd);
|
||||||
}
|
}
|
||||||
|
|
||||||
pktns = qc->apktns;
|
pktns = qc->apktns;
|
||||||
if (pktns) {
|
if (pktns) {
|
||||||
chunk_appendf(&trash, " [01rtt] rx.ackrng=%-6zu tx.inflight=%-6zu(%ld%%)\n",
|
chunk_appendf(&trash, " [01rtt] rx.ackrng=%-6zu tx.inflight=%-6zu(%llu%%)\n",
|
||||||
pktns->rx.arngs.sz, pktns->tx.in_flight,
|
pktns->rx.arngs.sz, pktns->tx.in_flight,
|
||||||
pktns->tx.in_flight * 100 / qc->path->cwnd);
|
(ull)pktns->tx.in_flight * 100 / qc->path->cwnd);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user