Преглед изворни кода

src/datawizard/reduction.c: error: 'for' loop initial declarations are only allowed in C99 mode

Nathalie Furmento пре 13 година
родитељ
комит
c829e1b4a9
1 измењених фајлова са 2 додато и 1 уклоњено
  1. 2 1
      src/datawizard/reduction.c

+ 2 - 1
src/datawizard/reduction.c

@@ -189,7 +189,8 @@ void _starpu_data_end_reduction_mode(starpu_data_handle_t handle)
 
 		/* Redux step-by-step for step from 1 to replicate_count/2, i.e.
 		 * 1-by-1, then 2-by-2, then 4-by-4, etc. */
-		for (unsigned step = 1; step < replicate_count; step *=2)
+		unsigned step;
+		for (step = 1; step < replicate_count; step *=2)
 		{
 			unsigned i;
 			for (i = 0; i < replicate_count; i+=2*step)