From e8dbc2f5d0c06e5ef896870d3e3f146cc7a02751 Mon Sep 17 00:00:00 2001
From: Christian Holme <holme@tugraz.at>
Date: Thu, 6 Jun 2024 11:33:11 +0200
Subject: [PATCH] fix useless casts

for -Werror, as it is a warning in newer gcc versions
---
 src/noncart/nufft.c | 2 +-
 src/num/fft.c       | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/noncart/nufft.c b/src/noncart/nufft.c
index 7201d0613..9bf9e932d 100644
--- a/src/noncart/nufft.c
+++ b/src/noncart/nufft.c
@@ -1396,7 +1396,7 @@ static void nufft_apply_normal(const linop_data_t* _data, complex float* dst, co
 
 	for (int i = 0; i < ncycles; i++) {
 
-		if (data->conf.pcycle && (i != (int)data->cycle))
+		if (data->conf.pcycle && (i != data->cycle))
 			continue;
 
 		toeplitz_mult_lowmem(data, i, dst, src);
diff --git a/src/num/fft.c b/src/num/fft.c
index 4e90684fe..109e9a99d 100644
--- a/src/num/fft.c
+++ b/src/num/fft.c
@@ -517,7 +517,7 @@ static void fft_apply(const operator_data_t* _plan, int N, void* args[N])
 
 #pragma 	omp critical(cufft_create_plan_in_threads)
 		if (NULL == plan->cuplan)
-			((struct fft_plan_s*)plan)->cuplan = fft_cuda_plan(plan->D, plan->dims, plan->flags, plan->ostrs, plan->istrs, plan->backwards);
+			plan->cuplan = fft_cuda_plan(plan->D, plan->dims, plan->flags, plan->ostrs, plan->istrs, plan->backwards);
 #endif
 		if (NULL == plan->cuplan)
 			error("Failed to plan a GPU FFT (too large?)\n");