Rather obvious fix, a bit hidden as CUDA_CALL hides the 'false',
but it actually just calls CUDA_CALL_ERET(NULL, FN, ...).

Committed as r15-5381-ge7e3d1838f7cfb.

Tobias
commit e7e3d1838f7cfb4a9fca711d735d8f5ea47d16dc
Author: Tobias Burnus <tbur...@baylibre.com>
Date:   Mon Nov 18 11:06:58 2024 +0100

    libgomp/plugin/plugin-nvptx.c: Change false to NULL to fix C23 wrong-return-type error [PR117626]
    
    libgomp/ChangeLog:
    
            PR libgomp/117626
            * plugin/plugin-nvptx.c (nvptx_open_device): Use 'CUDA_CALL_ERET'
            with 'NULL' as error return instead of 'CUDA_CALL' that returns false.

diff --git a/libgomp/plugin/plugin-nvptx.c b/libgomp/plugin/plugin-nvptx.c
index e9a9d798fe6..f6d7f067571 100644
--- a/libgomp/plugin/plugin-nvptx.c
+++ b/libgomp/plugin/plugin-nvptx.c
@@ -595,8 +595,10 @@ nvptx_open_device (int n)
       GOMP_PLUGIN_debug (0, "Setting \"native\" GPU thread stack size"
 			 " ('CU_LIMIT_STACK_SIZE') to %u bytes\n",
 			 native_gpu_thread_stack_size);
-      CUDA_CALL (cuCtxSetLimit,
-		 CU_LIMIT_STACK_SIZE, (size_t) native_gpu_thread_stack_size);
+      CUDA_CALL_ERET (NULL,
+		      cuCtxSetLimit,
+		      CU_LIMIT_STACK_SIZE,
+		      (size_t) native_gpu_thread_stack_size);
     }
 
   /* OpenMP "soft stacks".  */

Reply via email to