libelf/elf_newscn.c: fix build failure against gcc-14 (-Walloc-size)
`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 <slyich@gmail.com>
1 file changed