From 74e3d6470abc35af63ed852de9871d717c763d3e Mon Sep 17 00:00:00 2001 From: lightningterror <18107717+lightningterror@users.noreply.github.com> Date: Thu, 3 Mar 2022 20:47:44 +0100 Subject: [PATCH] GS-hw: Fix Wunused-but-set-variable warnings in GSTextureCache. --- pcsx2/GS/Renderers/HW/GSTextureCache.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pcsx2/GS/Renderers/HW/GSTextureCache.cpp b/pcsx2/GS/Renderers/HW/GSTextureCache.cpp index 503946caa6..7d25e5acd0 100644 --- a/pcsx2/GS/Renderers/HW/GSTextureCache.cpp +++ b/pcsx2/GS/Renderers/HW/GSTextureCache.cpp @@ -914,9 +914,9 @@ void GSTextureCache::InvalidateVideoMem(const GSOffset& off, const GSVector4i& r // Called each time you want to read from the GS memory void GSTextureCache::InvalidateLocalMem(const GSOffset& off, const GSVector4i& r) { - u32 bp = off.bp(); - u32 psm = off.psm(); - u32 bw = off.bw(); + const u32 bp = off.bp(); + const u32 psm = off.psm(); + [[maybe_unused]] const u32 bw = off.bw(); GL_CACHE("TC: InvalidateLocalMem off(0x%x, %u, %s) r(%d, %d => %d, %d)", bp, @@ -2448,7 +2448,7 @@ GSTextureCache::SurfaceOffset GSTextureCache::ComputeSurfaceOffset(const Surface const GSVector4i& r1 = so.b2a_offset; const GSVector4i& r2 = b_rect; - const GSVector4i ri = r1.rintersect(r2); + [[maybe_unused]] const GSVector4i ri = r1.rintersect(r2); assert(!so.is_valid || (r1.eq(ri) && r1.x >= 0 && r1.y >= 0 && r1.z > 0 && r1.w > 0)); // Clear cache if size too big.