Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Silence some -Wswitch-default warnings. #1640

Merged
merged 1 commit into from
Dec 13, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions Source/Core/Core/FifoPlayer/FifoPlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ bool FifoPlayer::ShouldLoadBP(u8 address)
case BPMEM_LOADTLUT1:
case BPMEM_PERF1:
return false;
default:
return true;
}

return true;
}
6 changes: 3 additions & 3 deletions Source/Core/Core/PowerPC/JitILCommon/IR.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
8 changes: 2 additions & 6 deletions Source/Core/DolphinWX/MainNoGUI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
5 changes: 3 additions & 2 deletions Source/Core/VideoBackends/OGL/ProgramShaderCache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
8 changes: 4 additions & 4 deletions Source/Core/VideoBackends/Software/Tev.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand Down
3 changes: 3 additions & 0 deletions Source/Core/VideoCommon/BPMemory.h
Original file line number Diff line number Diff line change
Expand Up @@ -959,6 +959,9 @@ union AlphaTest
if ((comp0 == ALWAYS && comp1 == ALWAYS) || (comp0 == NEVER && comp1 == NEVER))
return PASS;
break;

default:
return UNDETERMINED;
}
return UNDETERMINED;
}
Expand Down
3 changes: 3 additions & 0 deletions Source/Core/VideoCommon/TextureDecoder_Common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down