diff --git a/src/common/layered_settings_interface.cpp b/src/common/layered_settings_interface.cpp index d56994985..427715d1d 100644 --- a/src/common/layered_settings_interface.cpp +++ b/src/common/layered_settings_interface.cpp @@ -12,7 +12,6 @@ LayeredSettingsInterface::~LayeredSettingsInterface() = default; bool LayeredSettingsInterface::Save() { Panic("Attempting to save layered settings interface"); - return false; } void LayeredSettingsInterface::Clear() @@ -183,13 +182,11 @@ void LayeredSettingsInterface::SetStringList(const char* section, const char* ke bool LayeredSettingsInterface::RemoveFromStringList(const char* section, const char* key, const char* item) { Panic("Attempt to call RemoveFromStringList() on layered settings interface"); - return false; } bool LayeredSettingsInterface::AddToStringList(const char* section, const char* key, const char* item) { Panic("Attempt to call AddToStringList() on layered settings interface"); - return true; } std::vector> LayeredSettingsInterface::GetKeyValueList(const char* section) const diff --git a/src/core/cdrom.cpp b/src/core/cdrom.cpp index 656caa7a9..737637a91 100644 --- a/src/core/cdrom.cpp +++ b/src/core/cdrom.cpp @@ -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) diff --git a/src/core/cpu_recompiler_code_generator.cpp b/src/core/cpu_recompiler_code_generator.cpp index 361c851a4..509db7b6d 100644 --- a/src/core/cpu_recompiler_code_generator.cpp +++ b/src/core/cpu_recompiler_code_generator.cpp @@ -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; } } diff --git a/src/core/digital_controller.cpp b/src/core/digital_controller.cpp index 14b16de38..cbc84e2b2 100644 --- a/src/core/digital_controller.cpp +++ b/src/core/digital_controller.cpp @@ -133,10 +133,7 @@ bool DigitalController::Transfer(const u8 data_in, u8* data_out) return false; default: - { UnreachableCode(); - return false; - } } } diff --git a/src/core/gte.cpp b/src/core/gte.cpp index db0b2658c..84f83aeb5 100644 --- a/src/core/gte.cpp +++ b/src/core/gte.cpp @@ -1356,7 +1356,6 @@ InstructionImpl GetInstructionImpl(u32 inst_bits, TickCount* ticks) default: Panic("Missing handler"); - return nullptr; } } diff --git a/src/core/guncon.cpp b/src/core/guncon.cpp index efd72dfa8..d80b53f51 100644 --- a/src/core/guncon.cpp +++ b/src/core/guncon.cpp @@ -175,10 +175,7 @@ bool GunCon::Transfer(const u8 data_in, u8* data_out) } default: - { UnreachableCode(); - return false; - } } } diff --git a/src/core/playstation_mouse.cpp b/src/core/playstation_mouse.cpp index 68025b12a..beecb7d0d 100644 --- a/src/core/playstation_mouse.cpp +++ b/src/core/playstation_mouse.cpp @@ -154,7 +154,6 @@ bool PlayStationMouse::Transfer(const u8 data_in, u8* data_out) default: { UnreachableCode(); - return false; } } } diff --git a/src/util/d3d11_stream_buffer.cpp b/src/util/d3d11_stream_buffer.cpp index d424510a3..ebf43b271 100644 --- a/src/util/d3d11_stream_buffer.cpp +++ b/src/util/d3d11_stream_buffer.cpp @@ -89,7 +89,6 @@ D3D11StreamBuffer::MappingResult D3D11StreamBuffer::Map(ID3D11DeviceContext1* co Log_ErrorPrintf("Map failed: 0x%08X (alignment %u, minsize %u, size %u, position %u, map type %u)", hr, alignment, min_size, m_size, m_position, static_cast(map_type)); Panic("Map failed"); - return {}; } return MappingResult{static_cast(sr.pData) + m_position, m_position, m_position / alignment, diff --git a/src/util/d3d12_device.cpp b/src/util/d3d12_device.cpp index fe40e9094..c3be9fc0e 100644 --- a/src/util/d3d12_device.cpp +++ b/src/util/d3d12_device.cpp @@ -2087,7 +2087,6 @@ bool D3D12Device::UpdateRootParameters(u32 dirty) default: UnreachableCode(); - return false; } } diff --git a/src/util/d3d12_stream_buffer.cpp b/src/util/d3d12_stream_buffer.cpp index c2e3f63ee..cfc340ba3 100644 --- a/src/util/d3d12_stream_buffer.cpp +++ b/src/util/d3d12_stream_buffer.cpp @@ -71,7 +71,6 @@ bool D3D12StreamBuffer::ReserveMemory(u32 num_bytes, u32 alignment) Log_ErrorPrintf("Attempting to allocate %u bytes from a %u byte stream buffer", static_cast(num_bytes), static_cast(m_size)); Panic("Stream buffer overflow"); - return false; } // Is the GPU behind or up to date with our current offset? diff --git a/src/util/postprocessing_shader_fx.cpp b/src/util/postprocessing_shader_fx.cpp index 736191c0c..5fb4fb9e9 100644 --- a/src/util/postprocessing_shader_fx.cpp +++ b/src/util/postprocessing_shader_fx.cpp @@ -160,7 +160,6 @@ static GPUSampler::Config MapSampler(const reshadefx::sampler_info& si) return GPUSampler::AddressMode::Repeat; case reshadefx::texture_address_mode::mirror: Panic("Not implemented"); - return GPUSampler::AddressMode::Repeat; case reshadefx::texture_address_mode::clamp: return GPUSampler::AddressMode::ClampToEdge; case reshadefx::texture_address_mode::border: @@ -241,7 +240,6 @@ static GPUPipeline::Primitive MapPrimitive(reshadefx::primitive_topology topolog return GPUPipeline::Primitive::Lines; case reshadefx::primitive_topology::line_strip: Panic("Unhandled line strip"); - return GPUPipeline::Primitive::Lines; case reshadefx::primitive_topology::triangle_list: return GPUPipeline::Primitive::Triangles; case reshadefx::primitive_topology::triangle_strip: diff --git a/src/util/vulkan_device.cpp b/src/util/vulkan_device.cpp index eb80f0c20..9f7a4edfe 100644 --- a/src/util/vulkan_device.cpp +++ b/src/util/vulkan_device.cpp @@ -3169,7 +3169,6 @@ bool VulkanDevice::UpdateDescriptorSets(u32 dirty) default: UnreachableCode(); - return false; } } diff --git a/src/util/vulkan_stream_buffer.cpp b/src/util/vulkan_stream_buffer.cpp index f9bef2675..e90d313cb 100644 --- a/src/util/vulkan_stream_buffer.cpp +++ b/src/util/vulkan_stream_buffer.cpp @@ -119,7 +119,6 @@ bool VulkanStreamBuffer::ReserveMemory(u32 num_bytes, u32 alignment) Log_ErrorPrintf("Attempting to allocate %u bytes from a %u byte stream buffer", static_cast(num_bytes), static_cast(m_size)); Panic("Stream buffer overflow"); - return false; } UpdateGPUPosition();