From b55af91f6b0ccb9afd09dcd3a42b9110c7e5be6f Mon Sep 17 00:00:00 2001 From: Milosch Meriac Date: Sun, 28 Apr 2024 14:20:30 +0400 Subject: [PATCH] bladeRF-fsk: correct calloc argument order in fir filter test Prevents compiler error - earlier calloc argument should specify number of elements, later size of each element - failed in Fedora Linux 40 with gcc version 14.0.1 20240411 (Red Hat 14.0.1-0) (GCC) closes #965 --- host/utilities/bladeRF-fsk/c/src/fir_filter.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/host/utilities/bladeRF-fsk/c/src/fir_filter.c b/host/utilities/bladeRF-fsk/c/src/fir_filter.c index 59f34f0e0..7def69727 100644 --- a/host/utilities/bladeRF-fsk/c/src/fir_filter.c +++ b/host/utilities/bladeRF-fsk/c/src/fir_filter.c @@ -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;