]> git.kaiwu.me - haproxy.git/commit
BUILD: mux_fcgi: avoid aliasing of a const struct in traces
authorWilly Tarreau <w@1wt.eu>
Fri, 28 Jan 2022 08:36:35 +0000 (09:36 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 28 Jan 2022 18:04:02 +0000 (19:04 +0100)
commit31a8306b932a78805d9b5018e5897ef8965eba12
tree673cd99a9ab8aad062b200fac96b6929a6cb5bd6
parent74bc9916006045bf4728b84550a40cde90987c3e
BUILD: mux_fcgi: avoid aliasing of a const struct in traces

fcgi_trace() declares fconn as a const and casts its mbuf array to
(struct buffer*), which rightfully upsets some older compilers. Better
just declare it as a writable variable and get rid of the cast. It's
harmless anyway. This has been there since 2.1 with commit 5c0f859c2
("MINOR: mux-fcgi/trace: Register a new trace source with its events")
and doens't need to be backported though it would not harm either.
src/mux_fcgi.c