Pārlūkot izejas kodu

tools/starpu_machine_display.c: explain why it is safe to ignore the return value of starpu_init() in this particular case.

Cyril Roelandt 13 gadi atpakaļ
vecāks
revīzija
ac077b682d
1 mainītis faili ar 3 papildinājumiem un 1 dzēšanām
  1. 3 1
      tools/starpu_machine_display.c

+ 3 - 1
tools/starpu_machine_display.c

@@ -112,7 +112,9 @@ int main(int argc, char **argv)
 {
 	parse_args(argc, argv);
 
-	starpu_init(NULL);
+	/* Even if starpu_init returns -ENODEV, we should go on : we will just
+	 * print that we found no device. */
+	(void) starpu_init(NULL);
 
 	unsigned ncpu = starpu_cpu_worker_get_count();
 	unsigned ncuda = starpu_cuda_worker_get_count();