mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-02-06 00:40:11 +00:00
Fix some warnings
This commit is contained in:
parent
fc5840cda6
commit
658b4f70ef
@ -87,7 +87,7 @@ error_code sys_hid_manager_ioctl(u32 hid_handle, u32 pkg_id, vm::ptr<void> buf,
|
|||||||
// pkg_id == 6 == setpressmode?
|
// pkg_id == 6 == setpressmode?
|
||||||
else if (pkg_id == 0x68)
|
else if (pkg_id == 0x68)
|
||||||
{
|
{
|
||||||
auto info = vm::static_ptr_cast<sys_hid_ioctl_68>(buf);
|
[[maybe_unused]] auto info = vm::static_ptr_cast<sys_hid_ioctl_68>(buf);
|
||||||
//info->unk2 = 0;
|
//info->unk2 = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -190,8 +190,6 @@ error_code sys_ss_get_cache_of_product_mode(vm::ptr<u8> ptr)
|
|||||||
{
|
{
|
||||||
sys_ss.todo("sys_ss_get_cache_of_product_mode(ptr=*0x%x)", ptr);
|
sys_ss.todo("sys_ss_get_cache_of_product_mode(ptr=*0x%x)", ptr);
|
||||||
|
|
||||||
s32 pid = 1;
|
|
||||||
|
|
||||||
if (!ptr)
|
if (!ptr)
|
||||||
{
|
{
|
||||||
return CELL_EINVAL;
|
return CELL_EINVAL;
|
||||||
|
@ -33,7 +33,7 @@ error_code sys_storage_open(u64 device, u64 mode, vm::ptr<u32> fd, u64 flags)
|
|||||||
return CELL_EFAULT;
|
return CELL_EFAULT;
|
||||||
}
|
}
|
||||||
|
|
||||||
u64 storage_id = device & 0xFFFFF00FFFFFFFF;
|
[[maybe_unused]] u64 storage_id = device & 0xFFFFF00FFFFFFFF;
|
||||||
fs::file file;
|
fs::file file;
|
||||||
|
|
||||||
if (const u32 id = idm::make<lv2_storage>(device, std::move(file), mode, flags))
|
if (const u32 id = idm::make<lv2_storage>(device, std::move(file), mode, flags))
|
||||||
|
@ -217,7 +217,7 @@ std::string FragmentProgramDecompiler::AddConst()
|
|||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto data = reinterpret_cast<be_t<u32>*>(static_cast<char*>(m_prog.get_data()) + m_size + 4 * sizeof(u32));
|
auto data = reinterpret_cast<be_t<u32>*>(reinterpret_cast<uptr>(m_prog.get_data()) + m_size + 4 * sizeof(u32));
|
||||||
m_offset = 2 * 4 * sizeof(u32);
|
m_offset = 2 * 4 * sizeof(u32);
|
||||||
u32 x = GetData(data[0]);
|
u32 x = GetData(data[0]);
|
||||||
u32 y = GetData(data[1]);
|
u32 y = GetData(data[1]);
|
||||||
|
@ -182,7 +182,7 @@ bool tar_object::extract(std::string vfs_mp)
|
|||||||
|
|
||||||
u64 mtime = octal_text_to_u64({header.mtime, std::size(header.mtime)});
|
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});
|
u64 atime = octal_text_to_u64({header.padding, 12});
|
||||||
|
|
||||||
// This is a fake timestamp, it can be invalid
|
// This is a fake timestamp, it can be invalid
|
||||||
@ -263,8 +263,6 @@ std::vector<u8> tar_object::save_directory(const std::string& src_dir, std::vect
|
|||||||
return std::move(init);
|
return std::move(init);
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 count = 0;
|
|
||||||
|
|
||||||
if (stat.is_directory)
|
if (stat.is_directory)
|
||||||
{
|
{
|
||||||
bool has_items = false;
|
bool has_items = false;
|
||||||
@ -311,7 +309,7 @@ std::vector<u8> tar_object::save_directory(const std::string& src_dir, std::vect
|
|||||||
if (func)
|
if (func)
|
||||||
{
|
{
|
||||||
// Use custom function for file saving if provided
|
// 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)))
|
if (!func(fd, saved_path, std::move(init)))
|
||||||
{
|
{
|
||||||
// Revert (this entry should not be included if func returns false)
|
// Revert (this entry should not be included if func returns false)
|
||||||
@ -338,7 +336,7 @@ std::vector<u8> tar_object::save_directory(const std::string& src_dir, std::vect
|
|||||||
|
|
||||||
// Prefer saving to name field as much as we can
|
// 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
|
// If it doesn't fit, save 100 characters at name and 155 characters preceding to it at max
|
||||||
const u64 prefix_size = std::clamp<usz>(saved_path.size(), 100, 255) - 100;
|
const u64 prefix_size = std::clamp<usz>(saved_path.size(), 100, 255) - 100;
|
||||||
std::memcpy(header.prefix, saved_path.data(), prefix_size);
|
std::memcpy(header.prefix, saved_path.data(), prefix_size);
|
||||||
const u64 name_size = std::min<usz>(saved_path.size(), 255) - prefix_size;
|
const u64 name_size = std::min<usz>(saved_path.size(), 255) - prefix_size;
|
||||||
std::memcpy(header.name, saved_path.data() + prefix_size, name_size);
|
std::memcpy(header.name, saved_path.data() + prefix_size, name_size);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user