From 415014dd6b8e5c40aa625785b46025a8b0ed1e47 Mon Sep 17 00:00:00 2001 From: Martin Herren Date: Mon, 9 Sep 2024 22:52:42 +0200 Subject: [PATCH] Fix compile error with gcc14 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes a compile error with gcc14: .../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] 227 | outbuf = calloc(sizeof(struct complex_sample), chunk_size); because the arguments of some callocs are inverted. Signed-off-by: Martin Herren (HB9FXX) --- 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;