Sfoglia il codice sorgente

Make sure that functions supposed to return a value do so.

Cyril Roelandt 12 anni fa
parent
commit
5f6adae21b
2 ha cambiato i file con 3 aggiunte e 1 eliminazioni
  1. 2 0
      examples/sched_ctx_utils/sched_ctx_utils.c
  2. 1 1
      src/core/task.c

+ 2 - 0
examples/sched_ctx_utils/sched_ctx_utils.c

@@ -92,6 +92,8 @@ void* start_bench(void *val){
 
 	rv[p->id].flops /= NSAMPLES;
 	rv[p->id].avg_timing /= NSAMPLES;
+
+	return NULL;
 }
 
 void start_2benchs(void (*bench)(unsigned, unsigned))

+ 1 - 1
src/core/task.c

@@ -491,7 +491,7 @@ int _starpu_task_submit_internally(struct starpu_task *task)
 int starpu_task_submit_to_ctx(struct starpu_task *task, unsigned sched_ctx_id)
 {
 	task->sched_ctx = sched_ctx_id;
-	starpu_task_submit(task);
+	return starpu_task_submit(task);
 }
 
 /* The StarPU core can submit tasks directly to the scheduler or a worker,