From 732d344328c45b884a1532bf4e78dabc47189c3a Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sat, 22 Jun 2019 13:01:47 -0700 Subject: [PATCH] Common: Fix some unused ident and case warnings. --- Core/MIPS/MIPSIntVFPU.cpp | 12 ++++++++++-- Core/MIPS/MIPSVFPUUtils.h | 14 +++++++------- GPU/GLES/DepalettizeShaderGLES.h | 1 - UI/DiscordIntegration.cpp | 2 ++ 4 files changed, 19 insertions(+), 10 deletions(-) diff --git a/Core/MIPS/MIPSIntVFPU.cpp b/Core/MIPS/MIPSIntVFPU.cpp index 3e5144c018..2c4c112cf0 100644 --- a/Core/MIPS/MIPSIntVFPU.cpp +++ b/Core/MIPS/MIPSIntVFPU.cpp @@ -874,6 +874,10 @@ namespace MIPSInt d[0] = ShrinkToHalf(s[0]) | ((u32)ShrinkToHalf(s[1]) << 16); d[1] = ShrinkToHalf(s[2]) | ((u32)ShrinkToHalf(s[3]) << 16); break; + + default: + ERROR_LOG_REPORT(CPU, "vf2h with invalid elements"); + break; } ApplyPrefixD(reinterpret_cast(d), outsize); WriteVector(reinterpret_cast(d), outsize, vd); @@ -939,7 +943,7 @@ namespace MIPSInt break; default: - ERROR_LOG_REPORT(CPU, "vus2i with more than 2 elements."); + ERROR_LOG_REPORT(CPU, "vus2i with more than 2 elements"); break; } break; @@ -963,7 +967,7 @@ namespace MIPSInt break; default: - ERROR_LOG_REPORT(CPU, "vs2i with more than 2 elements."); + ERROR_LOG_REPORT(CPU, "vs2i with more than 2 elements"); break; } break; @@ -2081,6 +2085,10 @@ namespace MIPSInt // t swizzles invalid so the multiply is always zero. d[0] = 0; break; + + default: + ERROR_LOG_REPORT(CPU, "vcrsp/vqmul with invalid elements"); + break; } // D prefix applies to the last element only (mask and sat) for pair and larger. diff --git a/Core/MIPS/MIPSVFPUUtils.h b/Core/MIPS/MIPSVFPUUtils.h index 5a9c59ae70..1489e33fc0 100644 --- a/Core/MIPS/MIPSVFPUUtils.h +++ b/Core/MIPS/MIPSVFPUUtils.h @@ -121,27 +121,27 @@ enum MatrixSize { M_Invalid = -1 }; -static u32 VFPU_SWIZZLE(int x, int y, int z, int w) { +inline u32 VFPU_SWIZZLE(int x, int y, int z, int w) { return (x << 0) | (y << 2) | (z << 4) | (w << 6); } -static u32 VFPU_MASK(int x, int y, int z, int w) { +inline u32 VFPU_MASK(int x, int y, int z, int w) { return (x << 0) | (y << 1) | (z << 2) | (w << 3); } -static u32 VFPU_ANY_SWIZZLE() { +inline u32 VFPU_ANY_SWIZZLE() { return 0x000000FF; } -static u32 VFPU_ABS(int x, int y, int z, int w) { +inline u32 VFPU_ABS(int x, int y, int z, int w) { return VFPU_MASK(x, y, z, w) << 8; } -static u32 VFPU_CONST(int x, int y, int z, int w) { +inline u32 VFPU_CONST(int x, int y, int z, int w) { return VFPU_MASK(x, y, z, w) << 12; } -static u32 VFPU_NEGATE(int x, int y, int z, int w) { +inline u32 VFPU_NEGATE(int x, int y, int z, int w) { return VFPU_MASK(x, y, z, w) << 16; } @@ -157,7 +157,7 @@ enum class VFPUConst { SIXTH, }; -static u32 VFPU_MAKE_CONSTANTS(VFPUConst x, VFPUConst y, VFPUConst z, VFPUConst w) { +inline u32 VFPU_MAKE_CONSTANTS(VFPUConst x, VFPUConst y, VFPUConst z, VFPUConst w) { u32 result = 0; if (x != VFPUConst::NONE) { // This sets the constant flag and the swizzle/abs flags for the right constant. diff --git a/GPU/GLES/DepalettizeShaderGLES.h b/GPU/GLES/DepalettizeShaderGLES.h index c93ef87fc0..9030d7c504 100644 --- a/GPU/GLES/DepalettizeShaderGLES.h +++ b/GPU/GLES/DepalettizeShaderGLES.h @@ -64,7 +64,6 @@ private: GLRenderManager *render_; bool useGL3_; - bool vertexShaderFailed_ = false; GLRShader *vertexShader_ = nullptr; std::map cache_; std::map texCache_; diff --git a/UI/DiscordIntegration.cpp b/UI/DiscordIntegration.cpp index 176e3059a3..41784abd17 100644 --- a/UI/DiscordIntegration.cpp +++ b/UI/DiscordIntegration.cpp @@ -31,10 +31,12 @@ Discord g_Discord; static const char *ppsspp_app_id = "423397985041383434"; +#ifdef ENABLE_DISCORD // No context argument? What? static void handleDiscordError(int errCode, const char *message) { ERROR_LOG(SYSTEM, "Discord error code %d: '%s'", errCode, message); } +#endif Discord::~Discord() { assert(!initialized_);