diff --git a/src/core/arm/unicorn/arm_unicorn.cpp b/src/core/arm/unicorn/arm_unicorn.cpp index b0cdc24037..d578736802 100644 --- a/src/core/arm/unicorn/arm_unicorn.cpp +++ b/src/core/arm/unicorn/arm_unicorn.cpp @@ -3,6 +3,7 @@ // Refer to the license.txt file included. #include +#include #include #include "common/assert.h" #include "common/microprofile.h" @@ -53,8 +54,10 @@ static bool UnmappedMemoryHook(uc_engine* uc, uc_mem_type type, u64 addr, int si void* user_data) { ARM_Interface::ThreadContext ctx{}; Core::CPU().SaveContext(ctx); - ASSERT_MSG(false, "Attempted to read from unmapped memory: 0x%lx, pc=0x%lx, lr=0x%lx", addr, - ctx.pc, ctx.cpu_registers[30]); + ASSERT_MSG(false, + "Attempted to read from unmapped memory: 0x%" PRIx64 ", pc=0x%" PRIx64 + ", lr=0x%" PRIx64, + addr, ctx.pc, ctx.cpu_registers[30]); return {}; } diff --git a/src/core/hle/kernel/hle_ipc.cpp b/src/core/hle/kernel/hle_ipc.cpp index bef4f15f53..880b3132b4 100644 --- a/src/core/hle/kernel/hle_ipc.cpp +++ b/src/core/hle/kernel/hle_ipc.cpp @@ -2,6 +2,7 @@ // Licensed under GPLv2 or any later version // Refer to the license.txt file included. +#include #include #include "common/assert.h" #include "common/common_funcs.h" diff --git a/src/core/hle/kernel/object_address_table.cpp b/src/core/hle/kernel/object_address_table.cpp index cd286f85d1..4aaedeea7f 100644 --- a/src/core/hle/kernel/object_address_table.cpp +++ b/src/core/hle/kernel/object_address_table.cpp @@ -2,6 +2,7 @@ // Licensed under GPLv2 or any later version // Refer to the license.txt file included. +#include #include "common/assert.h" #include "core/hle/kernel/object_address_table.h" @@ -10,12 +11,14 @@ namespace Kernel { ObjectAddressTable g_object_address_table; void ObjectAddressTable::Insert(VAddr addr, SharedPtr obj) { - ASSERT_MSG(objects.find(addr) == objects.end(), "Object already exists with addr=0x%lx", addr); + ASSERT_MSG(objects.find(addr) == objects.end(), "Object already exists with addr=0x%" PRIx64, + addr); objects[addr] = obj; } void ObjectAddressTable::Close(VAddr addr) { - ASSERT_MSG(objects.find(addr) != objects.end(), "Object does not exist with addr=0x%lx", addr); + ASSERT_MSG(objects.find(addr) != objects.end(), "Object does not exist with addr=0x%" PRIx64, + addr); objects.erase(addr); } diff --git a/src/core/hle/kernel/shared_memory.cpp b/src/core/hle/kernel/shared_memory.cpp index bc99993c81..b0db0a5d44 100644 --- a/src/core/hle/kernel/shared_memory.cpp +++ b/src/core/hle/kernel/shared_memory.cpp @@ -2,6 +2,7 @@ // Licensed under GPLv2 or any later version // Refer to the license.txt file included. +#include #include #include "common/logging/log.h" #include "core/core.h" @@ -107,7 +108,8 @@ ResultCode SharedMemory::Map(Process* target_process, VAddr address, MemoryPermi // Error out if the requested permissions don't match what the creator process allows. if (static_cast(permissions) & ~static_cast(own_other_permissions)) { - LOG_ERROR(Kernel, "cannot map id=%u, address=0x%lx name=%s, permissions don't match", + LOG_ERROR(Kernel, + "cannot map id=%u, address=0x%" PRIx64 " name=%s, permissions don't match", GetObjectId(), address, name.c_str()); return ERR_INVALID_COMBINATION; } @@ -115,7 +117,8 @@ ResultCode SharedMemory::Map(Process* target_process, VAddr address, MemoryPermi // Error out if the provided permissions are not compatible with what the creator process needs. if (other_permissions != MemoryPermission::DontCare && static_cast(this->permissions) & ~static_cast(other_permissions)) { - LOG_ERROR(Kernel, "cannot map id=%u, address=0x%lx name=%s, permissions don't match", + LOG_ERROR(Kernel, + "cannot map id=%u, address=0x%" PRIx64 " name=%s, permissions don't match", GetObjectId(), address, name.c_str()); return ERR_WRONG_PERMISSION; } @@ -132,7 +135,8 @@ ResultCode SharedMemory::Map(Process* target_process, VAddr address, MemoryPermi target_address, backing_block, backing_block_offset, size, MemoryState::Shared); if (result.Failed()) { LOG_ERROR(Kernel, - "cannot map id=%u, target_address=0x%lx name=%s, error mapping to virtual memory", + "cannot map id=%u, target_address=0x%" PRIx64 + " name=%s, error mapping to virtual memory", GetObjectId(), target_address, name.c_str()); return result.Code(); } diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp index c22da6e47e..8327afcf14 100644 --- a/src/core/hle/kernel/svc.cpp +++ b/src/core/hle/kernel/svc.cpp @@ -39,7 +39,7 @@ static ResultCode SetHeapSize(VAddr* heap_addr, u64 heap_size) { } static ResultCode SetMemoryAttribute(VAddr addr, u64 size, u32 state0, u32 state1) { - LOG_WARNING(Kernel_SVC, "(STUBBED) called, addr=0x%lx", addr); + LOG_WARNING(Kernel_SVC, "(STUBBED) called, addr=0x%" PRIx64, addr); return RESULT_SUCCESS; } @@ -711,8 +711,8 @@ static ResultCode ResetSignal(Handle handle) { /// Creates a TransferMemory object static ResultCode CreateTransferMemory(Handle* handle, VAddr addr, u64 size, u32 permissions) { - LOG_WARNING(Kernel_SVC, "(STUBBED) called addr=0x%lx, size=0x%lx, perms=%08X", addr, size, - permissions); + LOG_WARNING(Kernel_SVC, "(STUBBED) called addr=0x%" PRIx64 ", size=0x%" PRIx64 ", perms=%08X", + addr, size, permissions); *handle = 0; return RESULT_SUCCESS; } diff --git a/src/core/hle/service/filesystem/fsp_srv.cpp b/src/core/hle/service/filesystem/fsp_srv.cpp index 02e270f266..202c371585 100644 --- a/src/core/hle/service/filesystem/fsp_srv.cpp +++ b/src/core/hle/service/filesystem/fsp_srv.cpp @@ -197,7 +197,7 @@ private: IPC::RequestParser rp{ctx}; const u64 unk = rp.Pop(); - LOG_DEBUG(Service_FS, "called, unk=0x%llx", unk); + LOG_DEBUG(Service_FS, "called, unk=0x%" PRIx64, unk); // Calculate how many entries we can fit in the output buffer u64 count_entries = ctx.GetWriteBufferSize() / sizeof(FileSys::Entry); diff --git a/src/core/hle/service/nvdrv/devices/nvdisp_disp0.cpp b/src/core/hle/service/nvdrv/devices/nvdisp_disp0.cpp index aa6c7e8dc9..bc2667cd32 100644 --- a/src/core/hle/service/nvdrv/devices/nvdisp_disp0.cpp +++ b/src/core/hle/service/nvdrv/devices/nvdisp_disp0.cpp @@ -2,6 +2,7 @@ // Licensed under GPLv2 or any later version // Refer to the license.txt file included. +#include #include "common/assert.h" #include "common/logging/log.h" #include "core/core.h" @@ -21,8 +22,9 @@ void nvdisp_disp0::flip(u32 buffer_handle, u32 offset, u32 format, u32 width, u3 u32 stride, NVFlinger::BufferQueue::BufferTransformFlags transform) { VAddr addr = nvmap_dev->GetObjectAddress(buffer_handle); LOG_WARNING(Service, - "Drawing from address %lx offset %08X Width %u Height %u Stride %u Format %u", addr, - offset, width, height, stride, format); + "Drawing from address %" PRIx64 + " offset %08X Width %u Height %u Stride %u Format %u", + addr, offset, width, height, stride, format); using PixelFormat = Tegra::FramebufferConfig::PixelFormat; const Tegra::FramebufferConfig framebuffer{ diff --git a/src/video_core/renderer_opengl/renderer_opengl.cpp b/src/video_core/renderer_opengl/renderer_opengl.cpp index baff2c7af9..55d2a17138 100644 --- a/src/video_core/renderer_opengl/renderer_opengl.cpp +++ b/src/video_core/renderer_opengl/renderer_opengl.cpp @@ -303,7 +303,7 @@ void RendererOpenGL::DrawScreenTriangles(const ScreenInfo& screen_info, float x, } else { // Other transformations are unsupported LOG_CRITICAL(Render_OpenGL, "Unsupported framebuffer_transform_flags=%d", - framebuffer_transform_flags); + static_cast(framebuffer_transform_flags)); UNIMPLEMENTED(); } }