mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-11-27 05:41:10 +01:00
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.
This commit is contained in:
parent
3b2fb5cc15
commit
09d4c9519e
@ -115,7 +115,7 @@ static void ssl_trace(enum trace_level level, uint64_t mask, const struct trace_
|
||||
const ssize_t *size = a2;
|
||||
|
||||
if (size)
|
||||
chunk_appendf(&trace_buf, " : size=%ld", *size);
|
||||
chunk_appendf(&trace_buf, " : size=%ld", (long)*size);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user