From dfe8305ae7ca95edc14aba0df04398b825c8e413 Mon Sep 17 00:00:00 2001 From: Tillmann Karras Date: Tue, 9 Oct 2018 23:47:18 +0100 Subject: [PATCH 1/2] PowerPC: fix a cast warning --- Source/Core/Core/PowerPC/PowerPC.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/Core/Core/PowerPC/PowerPC.cpp b/Source/Core/Core/PowerPC/PowerPC.cpp index 8abac6ae87..203ff3b825 100644 --- a/Source/Core/Core/PowerPC/PowerPC.cpp +++ b/Source/Core/Core/PowerPC/PowerPC.cpp @@ -191,7 +191,8 @@ static void InitializeCPUCore(CPUCore cpu_core) s_cpu_core_base = JitInterface::InitJitCore(cpu_core); if (!s_cpu_core_base) // Handle Situations where JIT core isn't available { - WARN_LOG(POWERPC, "CPU core %d not available. Falling back to default.", cpu_core); + WARN_LOG(POWERPC, "CPU core %d not available. Falling back to default.", + static_cast(cpu_core)); s_cpu_core_base = JitInterface::InitJitCore(DefaultCPUCore()); } break; From db54b903ef8e2f9407be063c967d47f7c806db1f Mon Sep 17 00:00:00 2001 From: Tillmann Karras Date: Tue, 9 Oct 2018 23:47:32 +0100 Subject: [PATCH 2/2] Zero-initialize CPU state and register view --- Source/Core/Core/PowerPC/PowerPC.cpp | 2 +- Source/Core/DolphinQt/Debugger/RegisterColumn.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Core/Core/PowerPC/PowerPC.cpp b/Source/Core/Core/PowerPC/PowerPC.cpp index 203ff3b825..174406d1ce 100644 --- a/Source/Core/Core/PowerPC/PowerPC.cpp +++ b/Source/Core/Core/PowerPC/PowerPC.cpp @@ -30,7 +30,7 @@ namespace PowerPC { // STATE_TO_SAVE -PowerPCState ppcState; +PowerPCState ppcState{}; static CPUCoreBase* s_cpu_core_base = nullptr; static bool s_cpu_core_base_is_injected = false; diff --git a/Source/Core/DolphinQt/Debugger/RegisterColumn.h b/Source/Core/DolphinQt/Debugger/RegisterColumn.h index dfc58a41f5..1604aea401 100644 --- a/Source/Core/DolphinQt/Debugger/RegisterColumn.h +++ b/Source/Core/DolphinQt/Debugger/RegisterColumn.h @@ -67,6 +67,6 @@ private: std::function m_get_register; std::function m_set_register; - u64 m_value; + u64 m_value = 0; RegisterDisplay m_display = RegisterDisplay::Hex; };