fix some warnings

This commit is contained in:
Megamouse 2024-04-15 08:49:01 +02:00
parent e0d6f8a311
commit 2f53d58cd9
9 changed files with 20 additions and 21 deletions

View file

@ -210,6 +210,7 @@ void fmt_class_string<disc_change_manager::eject_state>::format(std::string& out
{ {
switch (error) switch (error)
{ {
STR_CASE(disc_change_manager::eject_state::unknown);
STR_CASE(disc_change_manager::eject_state::inserted); STR_CASE(disc_change_manager::eject_state::inserted);
STR_CASE(disc_change_manager::eject_state::ejected); STR_CASE(disc_change_manager::eject_state::ejected);
STR_CASE(disc_change_manager::eject_state::busy); STR_CASE(disc_change_manager::eject_state::busy);

View file

@ -77,7 +77,7 @@ struct avc2_settings
u8 video_stream_sharing = 0; u8 video_stream_sharing = 0;
u32 total_video_bitrate = 0; u32 total_video_bitrate = 0;
static bool saveable(bool is_writing) noexcept static bool saveable(bool /*is_writing*/) noexcept
{ {
return GET_SERIALIZATION_VERSION(cellSysutil) != 0; return GET_SERIALIZATION_VERSION(cellSysutil) != 0;
} }
@ -698,7 +698,7 @@ error_code cellSysutilAvc2SetSpeakerMuting(u8 muting)
return CELL_OK; return CELL_OK;
} }
error_code cellSysutilAvc2Load_shared(SceNpMatching2ContextId ctx_id, u32 container, vm::ptr<CellSysutilAvc2Callback> callback_func, vm::ptr<void> user_data, vm::cptr<CellSysutilAvc2InitParam> init_param) error_code cellSysutilAvc2Load_shared(SceNpMatching2ContextId /*ctx_id*/, u32 /*container*/, vm::ptr<CellSysutilAvc2Callback> callback_func, vm::ptr<void> user_data, vm::cptr<CellSysutilAvc2InitParam> init_param)
{ {
if (!init_param || !init_param->avc_init_param_version || if (!init_param || !init_param->avc_init_param_version ||
!(init_param->avc_init_param_version == 100 || !(init_param->avc_init_param_version == 100 ||

View file

@ -1731,14 +1731,12 @@ void rsxaudio_backend_thread::backend_init(const rsxaudio_state& ra_state, const
const AudioChannelCnt ch_cnt = static_cast<AudioChannelCnt>(std::min<u32>(static_cast<u32>(port_cfg.ch_cnt), static_cast<u32>(emu_cfg.channels))); const AudioChannelCnt ch_cnt = static_cast<AudioChannelCnt>(std::min<u32>(static_cast<u32>(port_cfg.ch_cnt), static_cast<u32>(emu_cfg.channels)));
f64 cb_frame_len = 0.0; f64 cb_frame_len = 0.0;
u32 backend_ch_cnt = 2;
audio_channel_layout backend_channel_layout = audio_channel_layout::stereo; audio_channel_layout backend_channel_layout = audio_channel_layout::stereo;
if (backend->Open(emu_cfg.audio_device, port_cfg.freq, sample_size, ch_cnt, emu_cfg.channel_layout)) if (backend->Open(emu_cfg.audio_device, port_cfg.freq, sample_size, ch_cnt, emu_cfg.channel_layout))
{ {
cb_frame_len = backend->GetCallbackFrameLen(); cb_frame_len = backend->GetCallbackFrameLen();
backend_channel_layout = backend->get_channel_layout(); backend_channel_layout = backend->get_channel_layout();
backend_ch_cnt = backend->get_channels();
sys_rsxaudio.notice("Opened audio backend (sampling_rate=%d, sample_size=%d, channels=%d, layout=%s)", backend->get_sampling_rate(), backend->get_sample_size(), backend->get_channels(), backend->get_channel_layout()); sys_rsxaudio.notice("Opened audio backend (sampling_rate=%d, sample_size=%d, channels=%d, layout=%s)", backend->get_sampling_rate(), backend->get_sample_size(), backend->get_channels(), backend->get_channel_layout());
} }
else else

View file

@ -30,7 +30,7 @@ namespace rsx
REGS(ctx)->register_vertex_info[attrib_index].data[channel_select] = value; REGS(ctx)->register_vertex_info[attrib_index].data[channel_select] = value;
} }
void push_draw_parameter_change(rsx::context* ctx, rsx::command_barrier_type type, u32 reg, u32 arg) void push_draw_parameter_change(rsx::context* ctx, rsx::command_barrier_type /*type*/, u32 reg, u32 arg)
{ {
if (REGS(ctx)->latch == arg || if (REGS(ctx)->latch == arg ||
!RSX(ctx)->in_begin_end || !RSX(ctx)->in_begin_end ||
@ -46,7 +46,7 @@ namespace rsx
REGS(ctx)->current_draw_clause.insert_command_barrier(index_base_modifier_barrier, arg); REGS(ctx)->current_draw_clause.insert_command_barrier(index_base_modifier_barrier, arg);
} }
u32 get_report_data_impl(rsx::context* ctx, u32 offset) u32 get_report_data_impl([[maybe_unused]] rsx::context* ctx, u32 offset)
{ {
u32 location = 0; u32 location = 0;
blit_engine::context_dma report_dma = REGS(ctx)->context_dma_report(); blit_engine::context_dma report_dma = REGS(ctx)->context_dma_report();

View file

@ -20,7 +20,7 @@ namespace rsx
RSX(ctx)->m_graphics_state |= rsx::pipeline_state::fragment_program_ucode_dirty; RSX(ctx)->m_graphics_state |= rsx::pipeline_state::fragment_program_ucode_dirty;
} }
void set_transform_constant::impl(context* ctx, u32 reg, u32 arg) void set_transform_constant::impl(context* ctx, u32 reg, u32 /*arg*/)
{ {
const u32 index = reg - NV4097_SET_TRANSFORM_CONSTANT; const u32 index = reg - NV4097_SET_TRANSFORM_CONSTANT;
const u32 constant_id = index / 4; const u32 constant_id = index / 4;
@ -77,7 +77,7 @@ namespace rsx
RSX(ctx)->fifo_ctrl->skip_methods(rcount - 1); RSX(ctx)->fifo_ctrl->skip_methods(rcount - 1);
} }
void set_transform_program::impl(context* ctx, u32 reg, u32 arg) void set_transform_program::impl(context* ctx, u32 reg, u32 /*arg*/)
{ {
const u32 index = reg - NV4097_SET_TRANSFORM_PROGRAM; const u32 index = reg - NV4097_SET_TRANSFORM_PROGRAM;

View file

@ -124,7 +124,7 @@ namespace rsx
template<u32 index> template<u32 index>
struct set_vertex_data4ub_m struct set_vertex_data4ub_m
{ {
static void impl(context* ctx, u32 reg, u32 arg) static void impl(context* ctx, u32 /*reg*/, u32 arg)
{ {
set_vertex_data_impl<NV4097_SET_VERTEX_DATA4UB_M, index, 4, 4, u8>(ctx, arg); set_vertex_data_impl<NV4097_SET_VERTEX_DATA4UB_M, index, 4, 4, u8>(ctx, arg);
} }
@ -133,7 +133,7 @@ namespace rsx
template<u32 index> template<u32 index>
struct set_vertex_data1f_m struct set_vertex_data1f_m
{ {
static void impl(context* ctx, u32 reg, u32 arg) static void impl(context* ctx, u32 /*reg*/, u32 arg)
{ {
set_vertex_data_impl<NV4097_SET_VERTEX_DATA1F_M, index, 1, 1, f32>(ctx, arg); set_vertex_data_impl<NV4097_SET_VERTEX_DATA1F_M, index, 1, 1, f32>(ctx, arg);
} }
@ -142,7 +142,7 @@ namespace rsx
template<u32 index> template<u32 index>
struct set_vertex_data2f_m struct set_vertex_data2f_m
{ {
static void impl(context* ctx, u32 reg, u32 arg) static void impl(context* ctx, u32 /*reg*/, u32 arg)
{ {
set_vertex_data_impl<NV4097_SET_VERTEX_DATA2F_M, index, 2, 2, f32>(ctx, arg); set_vertex_data_impl<NV4097_SET_VERTEX_DATA2F_M, index, 2, 2, f32>(ctx, arg);
} }
@ -151,7 +151,7 @@ namespace rsx
template<u32 index> template<u32 index>
struct set_vertex_data3f_m struct set_vertex_data3f_m
{ {
static void impl(context* ctx, u32 reg, u32 arg) static void impl(context* ctx, u32 /*reg*/, u32 arg)
{ {
//Register alignment is only 1, 2, or 4 (Rachet & Clank 2) //Register alignment is only 1, 2, or 4 (Rachet & Clank 2)
set_vertex_data_impl<NV4097_SET_VERTEX_DATA3F_M, index, 3, 4, f32>(ctx, arg); set_vertex_data_impl<NV4097_SET_VERTEX_DATA3F_M, index, 3, 4, f32>(ctx, arg);
@ -161,7 +161,7 @@ namespace rsx
template<u32 index> template<u32 index>
struct set_vertex_data4f_m struct set_vertex_data4f_m
{ {
static void impl(context* ctx, u32 reg, u32 arg) static void impl(context* ctx, u32 /*reg*/, u32 arg)
{ {
set_vertex_data_impl<NV4097_SET_VERTEX_DATA4F_M, index, 4, 4, f32>(ctx, arg); set_vertex_data_impl<NV4097_SET_VERTEX_DATA4F_M, index, 4, 4, f32>(ctx, arg);
} }
@ -170,7 +170,7 @@ namespace rsx
template<u32 index> template<u32 index>
struct set_vertex_data2s_m struct set_vertex_data2s_m
{ {
static void impl(context* ctx, u32 reg, u32 arg) static void impl(context* ctx, u32 /*reg*/, u32 arg)
{ {
set_vertex_data_impl<NV4097_SET_VERTEX_DATA2S_M, index, 2, 2, u16>(ctx, arg); set_vertex_data_impl<NV4097_SET_VERTEX_DATA2S_M, index, 2, 2, u16>(ctx, arg);
} }
@ -179,7 +179,7 @@ namespace rsx
template<u32 index> template<u32 index>
struct set_vertex_data4s_m struct set_vertex_data4s_m
{ {
static void impl(context* ctx, u32 reg, u32 arg) static void impl(context* ctx, u32 /*reg*/, u32 arg)
{ {
set_vertex_data_impl<NV4097_SET_VERTEX_DATA4S_M, index, 4, 4, u16>(ctx, arg); set_vertex_data_impl<NV4097_SET_VERTEX_DATA4S_M, index, 4, 4, u16>(ctx, arg);
} }
@ -188,7 +188,7 @@ namespace rsx
template<u32 index> template<u32 index>
struct set_vertex_data_scaled4s_m struct set_vertex_data_scaled4s_m
{ {
static void impl(context* ctx, u32 reg, u32 arg) static void impl(context* ctx, u32 /*reg*/, u32 arg)
{ {
set_vertex_data_impl<NV4097_SET_VERTEX_DATA_SCALED4S_M, index, 4, 4, s16>(ctx, arg); set_vertex_data_impl<NV4097_SET_VERTEX_DATA_SCALED4S_M, index, 4, 4, s16>(ctx, arg);
} }

View file

@ -391,7 +391,7 @@ extern u16 serial_breathe_and_tag(utils::serial& ar, std::string_view name, bool
[[noreturn]] void hle_locks_t::lock() [[noreturn]] void hle_locks_t::lock()
{ {
// Unreachable // Unreachable
ensure(false); fmt::throw_exception("Unreachable");
} }
bool hle_locks_t::try_lock() bool hle_locks_t::try_lock()

View file

@ -13,6 +13,6 @@ bool cfg_root::node_core::enable_tsx_by_default()
std::string cfg_root::node_sys::get_random_system_name() std::string cfg_root::node_sys::get_random_system_name()
{ {
std::srand(std::time(nullptr)); std::srand(static_cast<u32>(std::time(nullptr)));
return "RPCS3-" + std::to_string(100 + std::rand() % 899); return "RPCS3-" + std::to_string(100 + std::rand() % 899);
} }

View file

@ -2172,9 +2172,6 @@
<ClInclude Include="Emu\system_progress.hpp"> <ClInclude Include="Emu\system_progress.hpp">
<Filter>Emu</Filter> <Filter>Emu</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="Emu\savestate_utils.hpp">
<Filter>Utilities</Filter>
</ClInclude>
<ClInclude Include="rpcs3_version.h"> <ClInclude Include="rpcs3_version.h">
<Filter>Emu</Filter> <Filter>Emu</Filter>
</ClInclude> </ClInclude>
@ -2521,6 +2518,9 @@
<ClInclude Include="Emu\RSX\NV47\FW\draw_call.hpp"> <ClInclude Include="Emu\RSX\NV47\FW\draw_call.hpp">
<Filter>Emu\GPU\RSX\NV47\FW</Filter> <Filter>Emu\GPU\RSX\NV47\FW</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="Emu\savestate_utils.hpp">
<Filter>Emu</Filter>
</ClInclude>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="Emu\RSX\Program\GLSLSnippets\GPUDeswizzle.glsl"> <None Include="Emu\RSX\Program\GLSLSnippets\GPUDeswizzle.glsl">