]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUILD: http_fetch: address a few aliasing warnings with older compilers
authorWilly Tarreau <w@1wt.eu>
Sun, 9 May 2021 08:32:54 +0000 (10:32 +0200)
committerWilly Tarreau <w@1wt.eu>
Sun, 9 May 2021 08:32:54 +0000 (10:32 +0200)
commit48584645fbe8ec869b0f7f54b26945aa2aa3c26d
treeef3f24201d602f25033b393ba18039ec7d80a9de
parentb2475a139e69ba7792054233faee946be7f83ca9
BUILD: http_fetch: address a few aliasing warnings with older compilers

gcc-4.4 complains about aliasing in smp_fetch_url_port() and
smp_fetch_url_ip() because the local addr variable is casted to sturct
sockaddr_in before being checked. The family should be checked on the
sockaddr_storage and we have a function to retrieve the port.
The compiler still sees some warnings but these ones are OK now.
src/http_fetch.c