summaryrefslogtreecommitdiffstats
path: root/libelf/gelf_xlatetom.c
diff options
context:
space:
mode:
authorSergei Trofimovich <[email protected]>2023-11-02 19:58:46 +0000
committerMark Wielaard <[email protected]>2023-11-03 00:19:53 +0100
commitfb232b56ca4dc37a70fd4e581a0fc2c56dda5e0a (patch)
treee839d05d99f850001a302bf4e51a5878b8582727 /libelf/gelf_xlatetom.c
parent6902b610939fbe15887905a0e2390c2f46cb1eb9 (diff)
libelf/elf_newscn.c: fix build failure against gcc-14 (-Walloc-size)upstream/master
`gcc-14` adde a new -Walloc-size warning that makes sure that size of an individual element matches size of a pointed type: https://gcc.gnu.org/PR71219 `elfutils` triggers is on `calloc()` call where member size is sued as `1`. elf_newscn.c: In function `elf_newscn`: elf_newscn.c:97:12: error: allocation of insufficient size «1» for type «Elf_ScnList» with size «16» [-Werror=alloc-size] 97 | newp = calloc (sizeof (Elf_ScnList) | ^ The change swaps arguments to pass larger value as a member size. Signed-off-by: Sergei Trofimovich <[email protected]>
Diffstat (limited to 'libelf/gelf_xlatetom.c')
0 files changed, 0 insertions, 0 deletions