From 85fd40fafdccb027dcc0d9fbec61c6fe12b941ff Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Thu, 6 Oct 2022 02:04:24 +0200 Subject: [PATCH] Fix -Wunused-const-variable warning when using clang-cl --- src/render/direct3d12/SDL_render_d3d12.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/render/direct3d12/SDL_render_d3d12.c b/src/render/direct3d12/SDL_render_d3d12.c index e5cbd4c4f..1e57b8e01 100644 --- a/src/render/direct3d12/SDL_render_d3d12.c +++ b/src/render/direct3d12/SDL_render_d3d12.c @@ -234,7 +234,7 @@ typedef struct /* Define D3D GUIDs here so we don't have to include uuid.lib. */ -#ifdef __GNUC__ +#if defined(__GNUC__) || defined(__clang__) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-const-variable" #endif @@ -259,7 +259,7 @@ static const GUID SDL_IID_ID3D12PipelineState = { 0x765a30f3, 0xf624, 0x4c6f, { static const GUID SDL_IID_ID3D12Heap = { 0x6b3b2502, 0x6e51, 0x45b3, { 0x90, 0xee, 0x98, 0x84, 0x26, 0x5e, 0x8d, 0xf3 } }; static const GUID SDL_IID_ID3D12InfoQueue = { 0x0742a90b, 0xc387, 0x483f, { 0xb9, 0x46, 0x30, 0xa7, 0xe4, 0xe6, 0x14, 0x58 } }; -#ifdef __GNUC__ +#if defined(__GNUC__) || defined(__clang__) #pragma GCC diagnostic pop #endif