瀏覽代碼

src/core/sched_ctx.c: for loop initial declarations are only allowed in c99 mode

Nathalie Furmento 9 年之前
父節點
當前提交
185ba72226
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      src/core/sched_ctx.c

+ 3 - 3
src/core/sched_ctx.c

@@ -795,12 +795,12 @@ unsigned starpu_sched_ctx_create(int *workerids, int nworkers, const char *sched
 	{
 	{
 		/* Make sure the user doesn't use invalid worker IDs. */
 		/* Make sure the user doesn't use invalid worker IDs. */
 		unsigned num_workers = starpu_worker_get_count();
 		unsigned num_workers = starpu_worker_get_count();
-		for (int i = 0; i < nworkers; i++)
+		int i;
+		for (i = 0; i < nworkers; i++)
 		{
 		{
 			if (workerids[i] < 0 || workerids[i] >= num_workers)
 			if (workerids[i] < 0 || workerids[i] >= num_workers)
 			{
 			{
-				_STARPU_ERROR("Invalid worker ID (%d) specified!\n",
-					      workerids[i]);
+				_STARPU_ERROR("Invalid worker ID (%d) specified!\n", workerids[i]);
 				return STARPU_NMAX_SCHED_CTXS;
 				return STARPU_NMAX_SCHED_CTXS;
 			}
 			}
 		}
 		}