diff --git a/rpcs3/Emu/Cell/lv2/sys_hid.cpp b/rpcs3/Emu/Cell/lv2/sys_hid.cpp index 6922d38ba2..7743984a4d 100644 --- a/rpcs3/Emu/Cell/lv2/sys_hid.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_hid.cpp @@ -87,7 +87,7 @@ error_code sys_hid_manager_ioctl(u32 hid_handle, u32 pkg_id, vm::ptr buf, // pkg_id == 6 == setpressmode? else if (pkg_id == 0x68) { - auto info = vm::static_ptr_cast(buf); + [[maybe_unused]] auto info = vm::static_ptr_cast(buf); //info->unk2 = 0; } diff --git a/rpcs3/Emu/Cell/lv2/sys_ss.cpp b/rpcs3/Emu/Cell/lv2/sys_ss.cpp index 1318061565..a073fca9f7 100644 --- a/rpcs3/Emu/Cell/lv2/sys_ss.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_ss.cpp @@ -190,8 +190,6 @@ error_code sys_ss_get_cache_of_product_mode(vm::ptr ptr) { sys_ss.todo("sys_ss_get_cache_of_product_mode(ptr=*0x%x)", ptr); - s32 pid = 1; - if (!ptr) { return CELL_EINVAL; diff --git a/rpcs3/Emu/Cell/lv2/sys_storage.cpp b/rpcs3/Emu/Cell/lv2/sys_storage.cpp index 6418d7c8aa..3b795ecdb6 100644 --- a/rpcs3/Emu/Cell/lv2/sys_storage.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_storage.cpp @@ -33,7 +33,7 @@ error_code sys_storage_open(u64 device, u64 mode, vm::ptr fd, u64 flags) return CELL_EFAULT; } - u64 storage_id = device & 0xFFFFF00FFFFFFFF; + [[maybe_unused]] u64 storage_id = device & 0xFFFFF00FFFFFFFF; fs::file file; if (const u32 id = idm::make(device, std::move(file), mode, flags)) diff --git a/rpcs3/Emu/RSX/Program/FragmentProgramDecompiler.cpp b/rpcs3/Emu/RSX/Program/FragmentProgramDecompiler.cpp index 59505d082e..7b73e4aabb 100644 --- a/rpcs3/Emu/RSX/Program/FragmentProgramDecompiler.cpp +++ b/rpcs3/Emu/RSX/Program/FragmentProgramDecompiler.cpp @@ -217,7 +217,7 @@ std::string FragmentProgramDecompiler::AddConst() return name; } - auto data = reinterpret_cast*>(static_cast(m_prog.get_data()) + m_size + 4 * sizeof(u32)); + auto data = reinterpret_cast*>(reinterpret_cast(m_prog.get_data()) + m_size + 4 * sizeof(u32)); m_offset = 2 * 4 * sizeof(u32); u32 x = GetData(data[0]); u32 y = GetData(data[1]); diff --git a/rpcs3/Loader/TAR.cpp b/rpcs3/Loader/TAR.cpp index 933c29bfee..5705c69013 100644 --- a/rpcs3/Loader/TAR.cpp +++ b/rpcs3/Loader/TAR.cpp @@ -182,7 +182,7 @@ bool tar_object::extract(std::string vfs_mp) u64 mtime = octal_text_to_u64({header.mtime, std::size(header.mtime)}); - // Let's use it for optional atime + // Let's use it for optional atime u64 atime = octal_text_to_u64({header.padding, 12}); // This is a fake timestamp, it can be invalid @@ -263,8 +263,6 @@ std::vector tar_object::save_directory(const std::string& src_dir, std::vect return std::move(init); } - u32 count = 0; - if (stat.is_directory) { bool has_items = false; @@ -311,7 +309,7 @@ std::vector tar_object::save_directory(const std::string& src_dir, std::vect if (func) { // Use custom function for file saving if provided - // Allows for example to compress PNG files as JPEG in the TAR itself + // Allows for example to compress PNG files as JPEG in the TAR itself if (!func(fd, saved_path, std::move(init))) { // Revert (this entry should not be included if func returns false) @@ -338,7 +336,7 @@ std::vector tar_object::save_directory(const std::string& src_dir, std::vect // Prefer saving to name field as much as we can // If it doesn't fit, save 100 characters at name and 155 characters preceding to it at max - const u64 prefix_size = std::clamp(saved_path.size(), 100, 255) - 100; + const u64 prefix_size = std::clamp(saved_path.size(), 100, 255) - 100; std::memcpy(header.prefix, saved_path.data(), prefix_size); const u64 name_size = std::min(saved_path.size(), 255) - prefix_size; std::memcpy(header.name, saved_path.data() + prefix_size, name_size);