[packages/bladeRF] - added calloc patch (fixes gcc 14 warnings)
qboosh
qboosh at pld-linux.org
Wed Sep 18 21:58:22 CEST 2024
commit dc2974b7004e7d55da3ce718b4f80131237462c2
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Wed Sep 18 22:01:21 2024 +0200
- added calloc patch (fixes gcc 14 warnings)
bladeRF-calloc.patch | 25 +++++++++++++++++++++++++
bladeRF.spec | 2 ++
2 files changed, 27 insertions(+)
---
diff --git a/bladeRF.spec b/bladeRF.spec
index 7efe56b..3749ba2 100644
--- a/bladeRF.spec
+++ b/bladeRF.spec
@@ -14,6 +14,7 @@ Source0: https://github.com/Nuand/bladeRF/archive/%{version}/%{name}-%{version}.
%define noOS_gitref 0bba46e6f6f75785a65d425ece37d0a04daf6157
Source1: https://github.com/analogdevicesinc/no-OS/archive/%{noOS_gitref}/no-OS-%{noOS_gitref}.tar.gz
# Source1-md5: 2c06ff9297d8beb0482a1b0b5e4d3128
+Patch0: %{name}-calloc.patch
URL: https://github.com/Nuand/bladeRF
BuildRequires: cmake >= 3.5
# or libedit (libtecla preferred)
@@ -54,6 +55,7 @@ Pliki nagłówkowe biblioteki libbladeRF.
%prep
%setup -q
+%patch0 -p1
%{__tar} xf %{SOURCE1} -C thirdparty/analogdevicesinc/no-OS --strip-components=1
diff --git a/bladeRF-calloc.patch b/bladeRF-calloc.patch
new file mode 100644
index 0000000..b448dee
--- /dev/null
+++ b/bladeRF-calloc.patch
@@ -0,0 +1,25 @@
+host/utilities/bladeRF-fsk/c/src/fir_filter.c:227:28: error: 'calloc' sizes specified with 'sizeof' in the earlier argument and not in the later argument [-Werror=calloc-transposed-args]
+--- bladeRF-2024.05/host/utilities/bladeRF-fsk/c/src/fir_filter.c.orig 2024-03-04 23:16:08.000000000 +0100
++++ bladeRF-2024.05/host/utilities/bladeRF-fsk/c/src/fir_filter.c 2024-09-18 21:48:08.494117931 +0200
+@@ -213,18 +213,18 @@ int main(int argc, char *argv[])
+ return EXIT_FAILURE;
+ }
+
+- inbuf = calloc(2*sizeof(int16_t), chunk_size);
++ inbuf = calloc(chunk_size, 2*sizeof(int16_t));
+ if (!inbuf) {
+ perror("calloc");
+ goto out;
+ }
+- tempbuf = calloc(2*sizeof(int16_t), chunk_size);
++ tempbuf = calloc(chunk_size, 2*sizeof(int16_t));
+ if (!tempbuf) {
+ perror("calloc");
+ goto out;
+ }
+
+- outbuf = calloc(sizeof(struct complex_sample), chunk_size);
++ outbuf = calloc(chunk_size, sizeof(struct complex_sample));
+ if (!outbuf) {
+ perror("calloc");
+ goto out;
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/bladeRF.git/commitdiff/dc2974b7004e7d55da3ce718b4f80131237462c2
More information about the pld-cvs-commit
mailing list