mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-06 15:01:28 +12:00
Fix some narrowing warnings
This commit is contained in:
parent
42ee2463c7
commit
16c1b9ed73
1 changed files with 3 additions and 3 deletions
|
@ -129,9 +129,9 @@ error_code sys_memory_allocate(cpu_thread& cpu, u64 size, u64 flags, vm::ptr<u32
|
||||||
return {CELL_ENOMEM, dct.size - dct.used};
|
return {CELL_ENOMEM, dct.size - dct.used};
|
||||||
}
|
}
|
||||||
|
|
||||||
if (const auto area = reserve_map(size, align))
|
if (const auto area = reserve_map(static_cast<u32>(size), align))
|
||||||
{
|
{
|
||||||
if (const u32 addr = area->alloc(size, nullptr, align))
|
if (const u32 addr = area->alloc(static_cast<u32>(size), nullptr, align))
|
||||||
{
|
{
|
||||||
ensure(!g_fxo->get<sys_memory_address_table>().addrs[addr >> 16].exchange(&dct));
|
ensure(!g_fxo->get<sys_memory_address_table>().addrs[addr >> 16].exchange(&dct));
|
||||||
|
|
||||||
|
@ -139,7 +139,7 @@ error_code sys_memory_allocate(cpu_thread& cpu, u64 size, u64 flags, vm::ptr<u32
|
||||||
{
|
{
|
||||||
sys_memory.notice("sys_memory_allocate(): Allocated 0x%x address (size=0x%x)", addr, size);
|
sys_memory.notice("sys_memory_allocate(): Allocated 0x%x address (size=0x%x)", addr, size);
|
||||||
|
|
||||||
vm::lock_sudo(addr, size);
|
vm::lock_sudo(addr, static_cast<u32>(size));
|
||||||
cpu.check_state();
|
cpu.check_state();
|
||||||
*alloc_addr = addr;
|
*alloc_addr = addr;
|
||||||
return CELL_OK;
|
return CELL_OK;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue