Bugzilla – Bug 1220464
GCC 14: elfutils package fails
Last modified: 2024-04-10 06:13:07 UTC
Building elfutils with GCC 14 fails here: https://build.opensuse.org/package/live_build_log/openSUSE:Factory:Staging:Gcc7/elfutils/standard/x86_64 Due to: elfstrmerge.c: In function ‘main’: elfstrmerge.c:450:32: error: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument [-Werror=calloc-transposed-args] 450 | newscnbufs = calloc (sizeof (void *), newshnums); | ^~~~ elfstrmerge.c:450:32: note: earlier argument should specify number of elements, later size of each element Builds with: Index: elfutils-0.190/tests/elfstrmerge.c =================================================================== --- elfutils-0.190.orig/tests/elfstrmerge.c +++ elfutils-0.190/tests/elfstrmerge.c @@ -447,7 +447,7 @@ main (int argc, char **argv) } newshnums = shdrnum - 1; - newscnbufs = calloc (sizeof (void *), newshnums); + newscnbufs = calloc (newshnums, sizeof (void *)); if (newscnbufs == NULL) fail_errno ("Couldn't allocate memory for new section buffers", NULL);
Please make a submit request with the quoted change. Thanks.
This is an autogenerated message for OBS integration: This bug (1220464) was mentioned in https://build.opensuse.org/request/show/1158795 Factory / elfutils
A fix was merged.