From 241aa3a02cb6b134932cc7ca0639754152100c74 Mon Sep 17 00:00:00 2001 From: Carter Li Date: Mon, 22 Dec 2025 10:28:56 +0800 Subject: [PATCH] GPU (Linux): silences a strict-aliasing warning Fixes #2106 --- src/detection/gpu/gpu_wsl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/detection/gpu/gpu_wsl.cpp b/src/detection/gpu/gpu_wsl.cpp index 738a02546..55cd34fae 100644 --- a/src/detection/gpu/gpu_wsl.cpp +++ b/src/detection/gpu/gpu_wsl.cpp @@ -83,7 +83,7 @@ const char* ffGPUDetectByDirectX(FF_MAYBE_UNUSED const FFGPUOptions* options, FF if (SUCCEEDED(adapter->GetProperty(DXCoreAdapterProperty::InstanceLuid, sizeof(luid), &luid))) { static_assert(sizeof(luid) == sizeof(uint64_t), "LUID size mismatch"); - gpu->deviceId = ffGPUGeneral2Id(*(uint64_t*)&luid); + gpu->deviceId = ffGPUGeneral2Id((uint64_t) luid.HighPart << 32 | (uint64_t) luid.LowPart); } ffStrbufInit(&gpu->driver);