From c6d6aa60fa8437625552c7dd1cb29fba7a0c3b27 Mon Sep 17 00:00:00 2001 From: Jim Monte Date: Wed, 1 May 2019 10:57:26 +0200 Subject: [PATCH] Fixed Visual Studio C4334 compiler warnings related to 32-bit vs 64-bit shifts --- src/maths/fft/fftlib.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/maths/fft/fftlib.c b/src/maths/fft/fftlib.c index b8013f44f..5c73fc1c3 100644 --- a/src/maths/fft/fftlib.c +++ b/src/maths/fft/fftlib.c @@ -109,7 +109,8 @@ static inline void bitrevR2(double *ioptr, int M, short *BRLow) posBi = posB + 1; iolimit = ioptr + Nrems2; - for (; ioptr < iolimit; ioptr += POW2(M/2+1)) { + const size_t ioptr_inc = (size_t) POW2((M / 2 + 1)); + for (; ioptr < iolimit; ioptr += ioptr_inc) { for (Colstart = Nroot_1; Colstart >= 0; Colstart--) { iCol = Nroot_1; p0r = ioptr+ Nroot_1_ColInc + BRLow[Colstart]*4; @@ -1182,7 +1183,8 @@ static inline void scbitrevR2(double *ioptr, int M, short *BRLow, double scale) posBi = posB + 1; iolimit = ioptr + Nrems2; - for (; ioptr < iolimit; ioptr += POW2(M/2+1)) { + const size_t ioptr_inc = (size_t) POW2((M / 2 + 1)); + for (; ioptr < iolimit; ioptr += ioptr_inc) { for (Colstart = Nroot_1; Colstart >= 0; Colstart--) { iCol = Nroot_1; p0r = ioptr+ Nroot_1_ColInc + BRLow[Colstart]*4; @@ -2525,7 +2527,7 @@ static inline void frstage(double *ioptr, int M, double *Utbl) p0r = ioptr; p1r = ioptr + pos/2; - u0r = Utbl + POW2(M-3); + u0r = Utbl + (size_t) POW2(M-3); w0r = *u0r, @@ -3022,7 +3024,7 @@ static inline void ifrstage(double *ioptr, int M, double *Utbl) p0r = ioptr; p1r = ioptr + pos/2; - u0r = Utbl + POW2(M-3); + u0r = Utbl + (size_t) POW2(M-3); w0r = *u0r,