From ab269f6155cd9fff8f84ab4d8495dfa91df45843 Mon Sep 17 00:00:00 2001 From: elad335 <18193363+elad335@users.noreply.github.com> Date: Fri, 25 Apr 2025 19:21:14 +0300 Subject: [PATCH] Warning fixes --- rpcs3/Emu/Cell/PPUAnalyser.cpp | 5 +++-- rpcs3/Emu/Cell/SPUThread.cpp | 2 -- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/rpcs3/Emu/Cell/PPUAnalyser.cpp b/rpcs3/Emu/Cell/PPUAnalyser.cpp index 808c31f8a5..ac5d285712 100644 --- a/rpcs3/Emu/Cell/PPUAnalyser.cpp +++ b/rpcs3/Emu/Cell/PPUAnalyser.cpp @@ -2361,7 +2361,9 @@ bool ppu_module::analyse(u32 lib_toc, u32 entry, const u32 sec_end, con } case ppu_itype::MTSPR: { - switch (const u32 n = (op.spr >> 5) | ((op.spr & 0x1f) << 5)) + const u32 spr_idx = (op.spr >> 5) | ((op.spr & 0x1f) << 5); + + switch (spr_idx) { case 0x001: // MTXER { @@ -2459,7 +2461,6 @@ bool ppu_module::analyse(u32 lib_toc, u32 entry, const u32 sec_end, con const reg_state_t rb = get_reg(op.rb); const bool is_ra = ra(is_const) && (ra(minv) >= start && ra(minv) < segs_end); - const bool is_rb = rb(is_const) && (rb(minv) >= start && rb(minv) < segs_end); if (ra(is_const) == rb(is_const)) { diff --git a/rpcs3/Emu/Cell/SPUThread.cpp b/rpcs3/Emu/Cell/SPUThread.cpp index 3ab6a10a61..1d7c0d7f29 100644 --- a/rpcs3/Emu/Cell/SPUThread.cpp +++ b/rpcs3/Emu/Cell/SPUThread.cpp @@ -1209,8 +1209,6 @@ void spu_thread::dump_regs(std::string& ret, std::any& /*custom_data*/) const u32 saved_pc = umax; const u8* lsa_state_ptr = nullptr; - const u8* lsa_ptr = _ptr(ch_mfc_cmd.lsa); - // Load PC, GPRs and reservation data atomically // We may not load the entire context atomically, but there is importance their state being intact for debugging do