]> git.kaiwu.me - haproxy.git/commit
BUILD: tools: fix warning about incorrect cast with dladdr1()
authorWilly Tarreau <w@1wt.eu>
Fri, 28 Jan 2022 08:42:29 +0000 (09:42 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 28 Jan 2022 18:04:02 +0000 (19:04 +0100)
commitf3d5c4b032274e4b5e1879a616e93890043349f6
tree1f3a50dd9941a340bf8ae5d79d9d0a2151838164
parent8f0b4e97e78f62eac43e240155192131e7c6d072
BUILD: tools: fix warning about incorrect cast with dladdr1()

dladdr1() is used on glibc and takes a void**, but we pass it a
const ElfW(Sym)** and some compilers complain that we're aliasing.
Let's just set a may_alias attribute on the local variable to
address this. There's no need to backport this unless warnings are
reported on older distros or uncommon compilers.
src/tools.c