Misc: Unreachable code warning fixes

This commit is contained in:
Stenzek
2023-09-05 21:13:14 +10:00
parent be71fb6000
commit adc124c759
13 changed files with 0 additions and 23 deletions

View File

@ -879,7 +879,6 @@ u8 CDROM::ReadRegister(u32 offset)
Log_ErrorPrintf("Unknown CDROM register read: offset=0x%02X, index=%d", offset,
ZeroExtend32(s_status.index.GetValue()));
Panic("Unknown CDROM register");
return 0;
}
void CDROM::WriteRegister(u32 offset, u8 value)

View File

@ -274,7 +274,6 @@ Value CodeGenerator::ConvertValueSize(const Value& value, RegSize size, bool sig
}
UnreachableCode();
return Value{};
}
Value new_value = m_register_cache.AllocateScratch(size);
@ -330,7 +329,6 @@ void* CodeGenerator::GetCurrentCodePointer() const
return GetCurrentFarCodePointer();
Panic("unknown emitter");
return nullptr;
}
Value CodeGenerator::AddValues(const Value& lhs, const Value& rhs, bool set_flags)
@ -2480,7 +2478,6 @@ bool CodeGenerator::Compile_Branch(const CodeBlockInstruction& cbi)
else
{
UnreachableCode();
return false;
}
}
@ -2549,7 +2546,6 @@ bool CodeGenerator::Compile_Branch(const CodeBlockInstruction& cbi)
default:
UnreachableCode();
return false;
}
}

View File

@ -133,10 +133,7 @@ bool DigitalController::Transfer(const u8 data_in, u8* data_out)
return false;
default:
{
UnreachableCode();
return false;
}
}
}

View File

@ -1356,7 +1356,6 @@ InstructionImpl GetInstructionImpl(u32 inst_bits, TickCount* ticks)
default:
Panic("Missing handler");
return nullptr;
}
}

View File

@ -175,10 +175,7 @@ bool GunCon::Transfer(const u8 data_in, u8* data_out)
}
default:
{
UnreachableCode();
return false;
}
}
}

View File

@ -154,7 +154,6 @@ bool PlayStationMouse::Transfer(const u8 data_in, u8* data_out)
default:
{
UnreachableCode();
return false;
}
}
}