54d088036b
- Fix runtime issues with v6.8 kernel (bsc#1222249) New patch: get-shm_flag-defines-from-the-appropriate-include-file-for-linux-6.8-kernel.patch New patch: pr31373-deal-with-the-removal-of-strlcpy-from-linux-6.8.patch - Fix gcc14 build errors (bsc#1221706) New patch: bpf-translate.cxx-fix-build-against-upcoming-gcc14.patch New patch: pr31288-build-with-gcc14-cont.patch New patch: pr31288-build-with-gcc14.patch New patch: staprun-fix-build-against-upcoming-gcc14.patch New patch: stapvirt.c-more-gcc-14-werror-calloc-transposed-args-compatibility.patch OBS-URL: https://build.opensuse.org/request/show/1164226 OBS-URL: https://build.opensuse.org/package/show/devel:tools/systemtap?expand=0&rev=148
41 lines
1.4 KiB
Diff
41 lines
1.4 KiB
Diff
From: Frank Ch. Eigler <fche@redhat.com>
|
|
Date: Thu Jan 18 16:37:39 2024 -0500
|
|
Subject: stapvirt.c: More gcc-14 -Werror=calloc-transposed-args compatibility
|
|
Git-commit: 6c0b92b340db23ccc49e18007d4ecbdef3306bd6
|
|
References: bsc#1221706
|
|
Signed-off-by: Tony Jones <tonyj@suse.de>
|
|
|
|
stapvirt.c: More gcc-14 -Werror=calloc-transposed-args compatibility
|
|
|
|
diff --git a/stapvirt.c b/stapvirt.c
|
|
index 0a10fa8fe..af02a4f76 100644
|
|
--- a/stapvirt.c
|
|
+++ b/stapvirt.c
|
|
@@ -119,7 +119,7 @@ getActiveDomains(virConnectPtr conn, int **ids)
|
|
if (idsn <= 0)
|
|
return idsn;
|
|
|
|
- *ids = (int*) calloc(sizeof(int), idsn);
|
|
+ *ids = (int*) calloc(idsn, sizeof(int));
|
|
if (*ids == NULL)
|
|
return -1;
|
|
|
|
@@ -145,7 +145,7 @@ getInactiveDomains(virConnectPtr conn, char ***names)
|
|
if (namesn <= 0)
|
|
return namesn;
|
|
|
|
- *names = (char**) calloc(sizeof(char*), namesn);
|
|
+ *names = (char**) calloc(namesn, sizeof(char*));
|
|
if (*names == NULL)
|
|
return -1;
|
|
|
|
@@ -188,7 +188,7 @@ getAllDomains(virConnectPtr conn, virDomainPtr **domains)
|
|
goto cleanup_names;
|
|
|
|
// Time to prepare virDomainPtr array
|
|
- *domains = (virDomainPtr*) calloc(sizeof(virDomainPtr), idsn+namesn);
|
|
+ *domains = (virDomainPtr*) calloc(idsn+namesn, sizeof(virDomainPtr));
|
|
if (*domains == NULL) {
|
|
err("Can't allocate domains array\n");
|
|
goto cleanup_names;
|