diff --git a/FFTlib/ccmfft.c b/FFTlib/ccmfft.c
index fbbfde3def9a4410946719f3c8f674255d598fc0..cbb0d29dcbf4f15a3762498d5c2f8af11a363145 100644
--- a/FFTlib/ccmfft.c
+++ b/FFTlib/ccmfft.c
@@ -67,8 +67,9 @@ void ccmfft(complex *data, int n1, int n2, int ld1, int sign)
 	static DFTI_DESCRIPTOR_HANDLE handle[MAX_NUMTHREADS];
 	static int nprev[MAX_NUMTHREADS];
     MKL_LONG Status;
-	int j, id;
+	int j;
 #endif
+	int id;
 
 #ifdef _OPENMP
 	id = omp_get_thread_num();
diff --git a/FFTlib/cr1fft.c b/FFTlib/cr1fft.c
index 4831beb973ecf00c440a0d706d33041287dee20f..7d7c19e680e37571b5b329a2c5e546107352b670 100644
--- a/FFTlib/cr1fft.c
+++ b/FFTlib/cr1fft.c
@@ -61,8 +61,9 @@ void cr1fft(complex *cdata, REAL *rdata, int n, int sign)
 	static int nprev[MAX_NUMTHREADS];
 	REAL *tmp;
     MKL_LONG Status;
-	int i, id;
+	int i;
 #endif
+	int id;
 
 #ifdef _OPENMP
 	id = omp_get_thread_num();
diff --git a/FFTlib/crmfft.c b/FFTlib/crmfft.c
index e4dad54fd2b6237ed69c098e7827436e34ae1381..d628b3e24906b106a4d983f9317fdb615a36e785 100644
--- a/FFTlib/crmfft.c
+++ b/FFTlib/crmfft.c
@@ -75,8 +75,9 @@ void crmfft(complex *cdata, REAL *rdata, int n1, int n2, int ldc, int ldr, int s
 	static int nprev[MAX_NUMTHREADS];
     REAL *tmp;
     MKL_LONG Status;
-	int i, j, id;
+	int i, j;
 #endif
+	int id;
 
 #ifdef _OPENMP
 	id = omp_get_thread_num();
diff --git a/FFTlib/rc1fft.c b/FFTlib/rc1fft.c
index 99684424ebece107a1c71236b51dcc5fe2e86952..f37fb3d5678335aa120b5b8544ae0ee64b2fba0d 100644
--- a/FFTlib/rc1fft.c
+++ b/FFTlib/rc1fft.c
@@ -60,8 +60,9 @@ void rc1fft(REAL *rdata, complex *cdata, int n, int sign)
 	static DFTI_DESCRIPTOR_HANDLE handle[MAX_NUMTHREADS];
 	static int nprev[MAX_NUMTHREADS];
     MKL_LONG Status;
-	int i, id;
+	int i;
 #endif
+	int id;
 
 #ifdef _OPENMP
 	id = omp_get_thread_num();
diff --git a/FFTlib/rcmfft.c b/FFTlib/rcmfft.c
index 574de3031c1087725a6b40470b4d760065f6cb82..91da4c6ee9d286508ad3051983aded5b72dd004d 100644
--- a/FFTlib/rcmfft.c
+++ b/FFTlib/rcmfft.c
@@ -72,8 +72,9 @@ void rcmfft(REAL *rdata, complex *cdata, int n1, int n2, int ldr, int ldc, int s
 	static DFTI_DESCRIPTOR_HANDLE handle[MAX_NUMTHREADS];
 	static int nprev[MAX_NUMTHREADS];
     MKL_LONG Status;
-	int i, j, id;
+	int i, j;
 #endif
+	int id;
 
 #ifdef _OPENMP
 	id = omp_get_thread_num();