瀏覽代碼

- fix warning: control reaches end of non-void function

Olivier Aumage 8 年之前
父節點
當前提交
e446b4780e
共有 1 個文件被更改,包括 5 次插入3 次删除
  1. 5 3
      src/util/openmp_runtime_support_omp_api.c

+ 5 - 3
src/util/openmp_runtime_support_omp_api.c

@@ -47,9 +47,11 @@ static int _starpu_omp_get_region_thread_num(const struct starpu_omp_region * co
 	if (thread == region->master_thread)
 		return 0;
 	int tid = starpu_omp_thread_list_member(&region->thread_list, thread);
-	if (tid >= 0)
-		return tid+1;
-	_STARPU_ERROR("unrecognized omp thread\n");
+	if (tid < 0)
+	{
+		_STARPU_ERROR("unrecognized omp thread\n");
+	}
+	return tid+1;
 }
 
 int starpu_omp_get_thread_num()