瀏覽代碼

gpu: Fix build warning

Signed-off-by: Lei Jitang <leijitang@outlook.com>
Lei Jitang 10 月之前
父節點
當前提交
225f0d1219
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      gpu/gpu_info_oneapi.c

+ 1 - 1
gpu/gpu_info_oneapi.c

@@ -160,7 +160,7 @@ void oneapi_check_vram(oneapi_handle_t h, int driver, int device,
     return;
     return;
   }
   }
 
 
-  snprintf(&resp->gpu_name[0], GPU_NAME_LEN, props.modelName);
+  snprintf(&resp->gpu_name[0], GPU_NAME_LEN, "%s", props.modelName);
 
 
   // TODO this needs to map to ONEAPI_DEVICE_SELECTOR syntax
   // TODO this needs to map to ONEAPI_DEVICE_SELECTOR syntax
   // (this is probably wrong...)
   // (this is probably wrong...)