summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorRohit Nirmal <rohitnirmal9@gmail.com>2014-12-02 18:20:52 -0600
committerRohit Nirmal <rohitnirmal9@gmail.com>2014-12-11 22:23:05 -0600
commitb030d290671c283020c405dfd9e8658935dcf1cf (patch)
treeccb0660dd7c0dc19b09f5357305a94c81b7a50e5 /Source/Core
parent54f1e3a3c148d36e694d8bb08d282225bdcb3440 (diff)
Silence some -Wswitch-default warnings.
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/Core/FifoPlayer/FifoPlayer.cpp4
-rw-r--r--Source/Core/Core/PowerPC/JitILCommon/IR.cpp6
-rw-r--r--Source/Core/DolphinWX/MainNoGUI.cpp8
-rw-r--r--Source/Core/VideoBackends/OGL/ProgramShaderCache.cpp5
-rw-r--r--Source/Core/VideoBackends/Software/Tev.cpp8
-rw-r--r--Source/Core/VideoCommon/BPMemory.h3
-rw-r--r--Source/Core/VideoCommon/TextureDecoder_Common.cpp3
7 files changed, 20 insertions, 17 deletions
diff --git a/Source/Core/Core/FifoPlayer/FifoPlayer.cpp b/Source/Core/Core/FifoPlayer/FifoPlayer.cpp
index b06df099a4..fc33bb7552 100644
--- a/Source/Core/Core/FifoPlayer/FifoPlayer.cpp
+++ b/Source/Core/Core/FifoPlayer/FifoPlayer.cpp
@@ -453,7 +453,7 @@ bool FifoPlayer::ShouldLoadBP(u8 address)
case BPMEM_LOADTLUT1:
case BPMEM_PERF1:
return false;
+ default:
+ return true;
}
-
- return true;
}
diff --git a/Source/Core/Core/PowerPC/JitILCommon/IR.cpp b/Source/Core/Core/PowerPC/JitILCommon/IR.cpp
index 789bcc09de..bc8220a040 100644
--- a/Source/Core/Core/PowerPC/JitILCommon/IR.cpp
+++ b/Source/Core/Core/PowerPC/JitILCommon/IR.cpp
@@ -974,10 +974,10 @@ static unsigned ICmpInverseOp(unsigned op)
return ICmpSgt;
case ICmpSge:
return ICmpSlt;
+ default:
+ PanicAlert("Bad opcode");
+ return Nop;
}
-
- PanicAlert("Bad opcode");
- return Nop;
}
InstLoc IRBuilder::FoldXor(InstLoc Op1, InstLoc Op2)
diff --git a/Source/Core/DolphinWX/MainNoGUI.cpp b/Source/Core/DolphinWX/MainNoGUI.cpp
index c723bac087..be3d9a7df3 100644
--- a/Source/Core/DolphinWX/MainNoGUI.cpp
+++ b/Source/Core/DolphinWX/MainNoGUI.cpp
@@ -46,12 +46,8 @@ void Host_RefreshDSPDebuggerWindow() {}
static Common::Event updateMainFrameEvent;
void Host_Message(int Id)
{
- switch (Id)
- {
- case WM_USER_STOP:
- running = false;
- break;
- }
+ if (Id == WM_USER_STOP)
+ running = false;
}
static void* s_window_handle;
diff --git a/Source/Core/VideoBackends/OGL/ProgramShaderCache.cpp b/Source/Core/VideoBackends/OGL/ProgramShaderCache.cpp
index 0249ce3c95..18c0f57d78 100644
--- a/Source/Core/VideoBackends/OGL/ProgramShaderCache.cpp
+++ b/Source/Core/VideoBackends/OGL/ProgramShaderCache.cpp
@@ -55,9 +55,10 @@ static std::string GetGLSLVersionString()
return "#version 140";
case GLSL_150:
return "#version 150";
+ default:
+ // Shouldn't ever hit this
+ return "#version ERROR";
}
- // Shouldn't ever hit this
- return "#version ERROR";
}
void SHADER::SetProgramVariables()
diff --git a/Source/Core/VideoBackends/Software/Tev.cpp b/Source/Core/VideoBackends/Software/Tev.cpp
index 122e1293da..37c8563ae2 100644
--- a/Source/Core/VideoBackends/Software/Tev.cpp
+++ b/Source/Core/VideoBackends/Software/Tev.cpp
@@ -347,9 +347,8 @@ static bool AlphaCompare(int alpha, int ref, AlphaTest::CompareMode comp)
case AlphaTest::GREATER: return alpha > ref;
case AlphaTest::EQUAL: return alpha == ref;
case AlphaTest::NEQUAL: return alpha != ref;
+ default: return true;
}
-
- return true;
}
static bool TevAlphaTest(int alpha)
@@ -363,8 +362,8 @@ static bool TevAlphaTest(int alpha)
case 1: return comp0 || comp1; // or
case 2: return comp0 ^ comp1; // xor
case 3: return !(comp0 ^ comp1); // xnor
+ default: return true;
}
- return true;
}
static inline s32 WrapIndirectCoord(s32 coord, int wrapMode)
@@ -385,8 +384,9 @@ static inline s32 WrapIndirectCoord(s32 coord, int wrapMode)
return (coord % (16 << 7));
case ITW_0:
return 0;
+ default:
+ return 0;
}
- return 0;
}
void Tev::Indirect(unsigned int stageNum, s32 s, s32 t)
diff --git a/Source/Core/VideoCommon/BPMemory.h b/Source/Core/VideoCommon/BPMemory.h
index d8d1f230b8..4ebf12e0b0 100644
--- a/Source/Core/VideoCommon/BPMemory.h
+++ b/Source/Core/VideoCommon/BPMemory.h
@@ -959,6 +959,9 @@ union AlphaTest
if ((comp0 == ALWAYS && comp1 == ALWAYS) || (comp0 == NEVER && comp1 == NEVER))
return PASS;
break;
+
+ default:
+ return UNDETERMINED;
}
return UNDETERMINED;
}
diff --git a/Source/Core/VideoCommon/TextureDecoder_Common.cpp b/Source/Core/VideoCommon/TextureDecoder_Common.cpp
index 71e801afe7..e879e45e18 100644
--- a/Source/Core/VideoCommon/TextureDecoder_Common.cpp
+++ b/Source/Core/VideoCommon/TextureDecoder_Common.cpp
@@ -571,6 +571,9 @@ void TexDecoder_DecodeTexel(u8 *dst, const u8 *src, int s, int t, int imageWidth
case 7:
color = MakeRGBA(red2, green2, blue2, 0);
break;
+ default:
+ color = 0;
+ break;
}
*((u32*)dst) = color;