From cd6590e15cbae33bbda2908981cfe72fbf1b2549 Mon Sep 17 00:00:00 2001 From: Stenzek Date: Fri, 22 Dec 2023 04:13:30 +1000 Subject: [PATCH] Misc: Fix clang warnings --- pcsx2/GS/Renderers/DX11/D3D.cpp | 4 ++-- pcsx2/GS/Renderers/SW/GSRendererSW.cpp | 2 +- pcsx2/Memory.cpp | 1 - 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/pcsx2/GS/Renderers/DX11/D3D.cpp b/pcsx2/GS/Renderers/DX11/D3D.cpp index 6553cb3fe8..ec9cd3f5ea 100644 --- a/pcsx2/GS/Renderers/DX11/D3D.cpp +++ b/pcsx2/GS/Renderers/DX11/D3D.cpp @@ -359,7 +359,7 @@ GSRendererType D3D::GetPreferredRenderer() if (!adapter) return GSRendererType::DX11; - const auto get_d3d11_feature_level = [&factory, &adapter]() -> std::optional { + const auto get_d3d11_feature_level = [&adapter]() -> std::optional { static const D3D_FEATURE_LEVEL check[] = { D3D_FEATURE_LEVEL_12_0, D3D_FEATURE_LEVEL_11_0, @@ -378,7 +378,7 @@ GSRendererType D3D::GetPreferredRenderer() Console.WriteLn("D3D11 feature level for autodetection: %x", static_cast(feature_level)); return feature_level; }; - const auto get_d3d12_device = [&factory, &adapter]() { + const auto get_d3d12_device = [&adapter]() { wil::com_ptr_nothrow device; const HRESULT hr = D3D12CreateDevice(adapter.get(), D3D_FEATURE_LEVEL_11_0, IID_PPV_ARGS(device.put())); if (FAILED(hr)) diff --git a/pcsx2/GS/Renderers/SW/GSRendererSW.cpp b/pcsx2/GS/Renderers/SW/GSRendererSW.cpp index 47cec53e94..79491f472a 100644 --- a/pcsx2/GS/Renderers/SW/GSRendererSW.cpp +++ b/pcsx2/GS/Renderers/SW/GSRendererSW.cpp @@ -29,7 +29,7 @@ GSRenderer* CURRENT_ISA::makeGSRendererSW(int threads) #define LOG 0 -static FILE* s_fp = LOG ? fopen("c:\\temp1\\_.txt", "w") : NULL; +[[maybe_unused]] static FILE* s_fp = LOG ? fopen("c:\\temp1\\_.txt", "w") : nullptr; static constexpr GSVector4 s_pos_scale = GSVector4::cxpr(1.0f / 16, 1.0f / 16, 1.0f, 128.0f); diff --git a/pcsx2/Memory.cpp b/pcsx2/Memory.cpp index 698e2e5a00..10e719bed6 100644 --- a/pcsx2/Memory.cpp +++ b/pcsx2/Memory.cpp @@ -54,7 +54,6 @@ BIOS #endif int MemMode = 0; // 0 is Kernel Mode, 1 is Supervisor Mode, 2 is User Mode -static int s_ba6 = 0; static u16 s_ba[0xff]; static u16 s_dve_regs[0xff];