浏览代码

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.
 		/* 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. */
 		 * 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;
 			unsigned i;
 			for (i = 0; i < replicate_count; i+=2*step)
 			for (i = 0; i < replicate_count; i+=2*step)