From b0b1308160d0c72ad6c7001741a1767c1381de8e Mon Sep 17 00:00:00 2001 From: Lioncash Date: Tue, 12 Dec 2023 15:41:46 -0500 Subject: [PATCH] PPCDebugInterface: Silence trivial -Wmaybe-uninitialized warning We can just initialize register_index, even if it gets overwritten later on via Common::FromChars. --- Source/Core/Core/Debugger/PPCDebugInterface.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Core/Core/Debugger/PPCDebugInterface.cpp b/Source/Core/Core/Debugger/PPCDebugInterface.cpp index 7ab64c9310..094adff4ea 100644 --- a/Source/Core/Core/Debugger/PPCDebugInterface.cpp +++ b/Source/Core/Core/Debugger/PPCDebugInterface.cpp @@ -467,7 +467,7 @@ PPCDebugInterface::GetMemoryAddressFromInstruction(const std::string& instructio if (is_reg == offset_match[0]) { - unsigned register_index; + unsigned register_index = 0; Common::FromChars(offset_match.substr(1), register_index, 10); offset = (register_index == 0 ? 0 : m_system.GetPPCState().gpr[register_index]); }