]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUILD: ssl: avoid possible printf format warning in traces
authorWilly Tarreau <w@1wt.eu>
Wed, 21 May 2025 08:01:14 +0000 (10:01 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 21 May 2025 08:01:14 +0000 (10:01 +0200)
commit09d4c9519e2081d53129cc6f437437255efaa299
tree9116495711f69e253f43c9ca04cdac20785af6e1
parent3b2fb5cc15244e2b87224a470d964ec270e4f972
BUILD: ssl: avoid possible printf format warning in traces

When building on MIPS-32 with gcc-9.5 and glibc-2.31, I got this:

  src/ssl_trace.c: In function 'ssl_trace':
  src/ssl_trace.c:118:42: warning: format '%ld' expects argument of type 'long int', but argument 3 has type 'ssize_t' {aka 'const int'} [-Wformat=]
    118 |     chunk_appendf(&trace_buf, " : size=%ld", *size);
        |                                        ~~^   ~~~~~
        |                                          |   |
        |                                          |   ssize_t {aka const int}
        |                                          long int
        |                                        %d

Let's just cast the type. No backport needed.
src/ssl_trace.c