From d1f20822f112cf0fa485dd98d82be00f0ca3c616 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=80=9A=E6=B4=B2?= Date: Mon, 28 Jul 2025 15:39:35 +0800 Subject: [PATCH] GPU (macOS): silence compiler warnings --- src/detection/gpu/gpu_apple.m | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/detection/gpu/gpu_apple.m b/src/detection/gpu/gpu_apple.m index b4937fbf3..e206bdc1a 100644 --- a/src/detection/gpu/gpu_apple.m +++ b/src/detection/gpu/gpu_apple.m @@ -60,10 +60,13 @@ const char* ffGpuDetectMetal(FFlist* gpus) else if ([device supportsFeatureSet:MTLFeatureSet_macOS_GPUFamily1_v1]) ffStrbufSetStatic(&gpu->platformApi, "Metal Feature Set 1"); #else // MAC_OS_X_VERSION_10_15 + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wunguarded-availability-new" if ([device supportsFamily:MTLGPUFamilyMetal4]) ffStrbufSetStatic(&gpu->platformApi, "Metal 4"); else if ([device supportsFamily:MTLGPUFamilyMetal3]) ffStrbufSetStatic(&gpu->platformApi, "Metal 3"); + #pragma clang diagnostic pop else if ([device supportsFamily:MTLGPUFamilyCommon3]) ffStrbufSetStatic(&gpu->platformApi, "Metal Common 3"); else if ([device supportsFamily:MTLGPUFamilyCommon2])