From 1128f5f8eea6931a5fe142b47e185ea88e05e0f1 Mon Sep 17 00:00:00 2001 From: xperia64 Date: Sun, 6 Sep 2020 16:22:48 -0400 Subject: [PATCH] Silence some noisy switch case warning --- src/core/arm/arm_interface.h | 8 ++++++++ src/core/arm/dynarmic/arm_dynarmic.cpp | 12 ++++++++---- .../renderer_opengl/gl_shader_decompiler.cpp | 2 ++ 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/src/core/arm/arm_interface.h b/src/core/arm/arm_interface.h index 649aa9219b..ccbfd13c43 100644 --- a/src/core/arm/arm_interface.h +++ b/src/core/arm/arm_interface.h @@ -277,6 +277,8 @@ private: case VFP_FPSCR: case VFP_FPEXC: r = GetVFPSystemReg(reg); + default: + break; } ar << r; } @@ -287,6 +289,8 @@ private: case CP15_THREAD_UPRW: case CP15_THREAD_URO: r = GetCP15Register(reg); + default: + break; } ar << r; } @@ -321,6 +325,8 @@ private: case VFP_FPSCR: case VFP_FPEXC: SetVFPSystemReg(reg, r); + default: + break; } } for (std::size_t i = 0; i < CP15Register::CP15_REGISTER_COUNT; i++) { @@ -330,6 +336,8 @@ private: case CP15_THREAD_UPRW: case CP15_THREAD_URO: SetCP15Register(reg, r); + default: + break; } } } diff --git a/src/core/arm/dynarmic/arm_dynarmic.cpp b/src/core/arm/dynarmic/arm_dynarmic.cpp index 64cb0524ef..672e4f31a4 100644 --- a/src/core/arm/dynarmic/arm_dynarmic.cpp +++ b/src/core/arm/dynarmic/arm_dynarmic.cpp @@ -205,8 +205,9 @@ u32 ARM_Dynarmic::GetVFPSystemReg(VFPSystemRegister reg) const { return jit->Fpscr(); case VFP_FPEXC: return fpexc; + default: + UNREACHABLE_MSG("Unknown VFP system register: {}", static_cast(reg)); } - UNREACHABLE_MSG("Unknown VFP system register: {}", static_cast(reg)); } void ARM_Dynarmic::SetVFPSystemReg(VFPSystemRegister reg, u32 value) { @@ -217,8 +218,9 @@ void ARM_Dynarmic::SetVFPSystemReg(VFPSystemRegister reg, u32 value) { case VFP_FPEXC: fpexc = value; return; + default: + UNREACHABLE_MSG("Unknown VFP system register: {}", static_cast(reg)); } - UNREACHABLE_MSG("Unknown VFP system register: {}", static_cast(reg)); } u32 ARM_Dynarmic::GetCPSR() const { @@ -235,8 +237,9 @@ u32 ARM_Dynarmic::GetCP15Register(CP15Register reg) const { return cp15_state.cp15_thread_uprw; case CP15_THREAD_URO: return cp15_state.cp15_thread_uro; + default: + UNREACHABLE_MSG("Unknown CP15 register: {}", static_cast(reg)); } - UNREACHABLE_MSG("Unknown CP15 register: {}", static_cast(reg)); } void ARM_Dynarmic::SetCP15Register(CP15Register reg, u32 value) { @@ -247,8 +250,9 @@ void ARM_Dynarmic::SetCP15Register(CP15Register reg, u32 value) { case CP15_THREAD_URO: cp15_state.cp15_thread_uro = value; return; + default: + UNREACHABLE_MSG("Unknown CP15 register: {}", static_cast(reg)); } - UNREACHABLE_MSG("Unknown CP15 register: {}", static_cast(reg)); } std::unique_ptr ARM_Dynarmic::NewContext() const { diff --git a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp index 691c089eb1..b36228628e 100644 --- a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp +++ b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp @@ -189,6 +189,8 @@ private: labels); return exit_method = SeriesExit(both, after_call); } + default: + break; } } return exit_method = ExitMethod::AlwaysReturn;