From 1e33db85734eb658b0168743905d4b1a50030237 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Wed, 14 Feb 2018 00:27:46 -0500 Subject: vm_manager: Silence formatting specifier warnings --- src/core/hle/kernel/vm_manager.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/core/hle') diff --git a/src/core/hle/kernel/vm_manager.cpp b/src/core/hle/kernel/vm_manager.cpp index 6da77eb58..d5b36d71a 100644 --- a/src/core/hle/kernel/vm_manager.cpp +++ b/src/core/hle/kernel/vm_manager.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/logging/log.h" @@ -206,7 +207,8 @@ void VMManager::RefreshMemoryBlockMappings(const std::vector* block) { void VMManager::LogLayout(Log::Level log_level) const { for (const auto& p : vma_map) { const VirtualMemoryArea& vma = p.second; - LOG_GENERIC(Log::Class::Kernel, log_level, "%08X - %08X size: %8X %c%c%c %s", vma.base, + LOG_GENERIC(Log::Class::Kernel, log_level, + "%016" PRIx64 " - %016" PRIx64 " size: %16" PRIx64 " %c%c%c %s", vma.base, vma.base + vma.size, vma.size, (u8)vma.permissions & (u8)VMAPermission::Read ? 'R' : '-', (u8)vma.permissions & (u8)VMAPermission::Write ? 'W' : '-', @@ -222,8 +224,8 @@ VMManager::VMAIter VMManager::StripIterConstness(const VMAHandle& iter) { } ResultVal VMManager::CarveVMA(VAddr base, u64 size) { - ASSERT_MSG((size & Memory::PAGE_MASK) == 0, "non-page aligned size: 0x%8X", size); - ASSERT_MSG((base & Memory::PAGE_MASK) == 0, "non-page aligned base: 0x%08X", base); + ASSERT_MSG((size & Memory::PAGE_MASK) == 0, "non-page aligned size: 0x%16" PRIx64, size); + ASSERT_MSG((base & Memory::PAGE_MASK) == 0, "non-page aligned base: 0x%016" PRIx64, base); VMAIter vma_handle = StripIterConstness(FindVMA(base)); if (vma_handle == vma_map.end()) { @@ -258,8 +260,8 @@ ResultVal VMManager::CarveVMA(VAddr base, u64 size) { } ResultVal VMManager::CarveVMARange(VAddr target, u64 size) { - ASSERT_MSG((size & Memory::PAGE_MASK) == 0, "non-page aligned size: 0x%8X", size); - ASSERT_MSG((target & Memory::PAGE_MASK) == 0, "non-page aligned base: 0x%08X", target); + ASSERT_MSG((size & Memory::PAGE_MASK) == 0, "non-page aligned size: 0x%16" PRIx64, size); + ASSERT_MSG((target & Memory::PAGE_MASK) == 0, "non-page aligned base: 0x%016" PRIx64, target); VAddr target_end = target + size; ASSERT(target_end >= target); -- cgit v1.2.3 From c1146d2a5f9922a139f17336ba75be0100e5a485 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Wed, 14 Feb 2018 00:33:15 -0500 Subject: thread: Silence formatting specifier warnings --- src/core/hle/kernel/thread.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/core/hle') diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp index 111c496b9..1a33cc6cb 100644 --- a/src/core/hle/kernel/thread.cpp +++ b/src/core/hle/kernel/thread.cpp @@ -3,6 +3,7 @@ // Refer to the license.txt file included. #include +#include #include #include #include "common/assert.h" @@ -379,7 +380,7 @@ ResultVal> Thread::Create(std::string name, VAddr entry_point, SharedPtr owner_process) { // Check if priority is in ranged. Lowest priority -> highest priority id. if (priority > THREADPRIO_LOWEST) { - LOG_ERROR(Kernel_SVC, "Invalid thread priority: %d", priority); + LOG_ERROR(Kernel_SVC, "Invalid thread priority: %u", priority); return ERR_OUT_OF_RANGE; } @@ -391,7 +392,7 @@ ResultVal> Thread::Create(std::string name, VAddr entry_point, // TODO(yuriks): Other checks, returning 0xD9001BEA if (!Memory::IsValidVirtualAddress(*owner_process, entry_point)) { - LOG_ERROR(Kernel_SVC, "(name=%s): invalid entry %08x", name.c_str(), entry_point); + LOG_ERROR(Kernel_SVC, "(name=%s): invalid entry %016" PRIx64, name.c_str(), entry_point); // TODO (bunnei): Find the correct error code to use here return ResultCode(-1); } -- cgit v1.2.3 From dc97117a0b2d5119ca6b623b363590228237f13f Mon Sep 17 00:00:00 2001 From: Lioncash Date: Wed, 14 Feb 2018 00:41:26 -0500 Subject: nvhost_as_gpu: Silence formatting specifier warnings --- src/core/hle/service/nvdrv/devices/nvhost_as_gpu.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/core/hle') diff --git a/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.cpp b/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.cpp index 9832e1899..9892402fa 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.cpp +++ b/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.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" @@ -13,8 +14,8 @@ namespace Nvidia { namespace Devices { u32 nvhost_as_gpu::ioctl(Ioctl command, const std::vector& input, std::vector& output) { - LOG_DEBUG(Service_NVDRV, "called, command=0x%08x, input_size=0x%llx, output_size=0x%llx", - command, input.size(), output.size()); + LOG_DEBUG(Service_NVDRV, "called, command=0x%08x, input_size=0x%zx, output_size=0x%zx", + command.raw, input.size(), output.size()); switch (static_cast(command.raw)) { case IoctlCommand::IocInitalizeExCommand: @@ -62,7 +63,8 @@ u32 nvhost_as_gpu::MapBufferEx(const std::vector& input, std::vector& ou std::memcpy(¶ms, input.data(), input.size()); LOG_DEBUG(Service_NVDRV, - "called, flags=%x, nvmap_handle=%x, buffer_offset=%lx, mapping_size=%lx, offset=%lx", + "called, flags=%x, nvmap_handle=%x, buffer_offset=%" PRIu64 ", mapping_size=%" PRIu64 + ", offset=%" PRIu64, params.flags, params.nvmap_handle, params.buffer_offset, params.mapping_size, params.offset); @@ -97,8 +99,8 @@ u32 nvhost_as_gpu::BindChannel(const std::vector& input, std::vector& ou u32 nvhost_as_gpu::GetVARegions(const std::vector& input, std::vector& output) { IoctlGetVaRegions params{}; std::memcpy(¶ms, input.data(), input.size()); - LOG_WARNING(Service_NVDRV, "(STUBBED) called, buf_addr=%lx, buf_size=%x", params.buf_addr, - params.buf_size); + LOG_WARNING(Service_NVDRV, "(STUBBED) called, buf_addr=%" PRIu64 ", buf_size=%x", + params.buf_addr, params.buf_size); params.buf_size = 0x30; params.regions[0].offset = 0x04000000; -- cgit v1.2.3 From ce1fe0387f5629778e23233d9b2e0d98dfb043cd Mon Sep 17 00:00:00 2001 From: Lioncash Date: Wed, 14 Feb 2018 00:43:26 -0500 Subject: nvhost_ctrl_gpu: Silence formatting specifier warnings --- src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/core/hle') diff --git a/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.cpp b/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.cpp index 4776c8aa3..3b353d742 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.cpp +++ b/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.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/hle/service/nvdrv/devices/nvhost_ctrl_gpu.h" @@ -11,8 +12,8 @@ namespace Nvidia { namespace Devices { u32 nvhost_ctrl_gpu::ioctl(Ioctl command, const std::vector& input, std::vector& output) { - LOG_DEBUG(Service_NVDRV, "called, command=0x%08x, input_size=0x%llx, output_size=0x%llx", - command, input.size(), output.size()); + LOG_DEBUG(Service_NVDRV, "called, command=0x%08x, input_size=0x%zx, output_size=0x%zx", + command.raw, input.size(), output.size()); switch (static_cast(command.raw)) { case IoctlCommand::IocGetCharacteristicsCommand: @@ -78,7 +79,7 @@ u32 nvhost_ctrl_gpu::GetCharacteristics(const std::vector& input, std::vecto u32 nvhost_ctrl_gpu::GetTPCMasks(const std::vector& input, std::vector& output) { IoctlGpuGetTpcMasksArgs params{}; std::memcpy(¶ms, input.data(), input.size()); - LOG_WARNING(Service_NVDRV, "(STUBBED) called, mask=0x%x, mask_buf_addr=0x%lx", + LOG_WARNING(Service_NVDRV, "(STUBBED) called, mask=0x%x, mask_buf_addr=0x%" PRIx64, params.mask_buf_size, params.mask_buf_addr); std::memcpy(output.data(), ¶ms, sizeof(params)); return 0; -- cgit v1.2.3 From 2d388a75f0f057821d8747cabcb3fc8ae74f28d7 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Wed, 14 Feb 2018 00:44:26 -0500 Subject: nvhost_ctrl: Silence formatting specifier warnings --- src/core/hle/service/nvdrv/devices/nvhost_ctrl.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/core/hle') diff --git a/src/core/hle/service/nvdrv/devices/nvhost_ctrl.cpp b/src/core/hle/service/nvdrv/devices/nvhost_ctrl.cpp index c0e35237a..ee99ab280 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_ctrl.cpp +++ b/src/core/hle/service/nvdrv/devices/nvhost_ctrl.cpp @@ -11,8 +11,8 @@ namespace Nvidia { namespace Devices { u32 nvhost_ctrl::ioctl(Ioctl command, const std::vector& input, std::vector& output) { - LOG_DEBUG(Service_NVDRV, "called, command=0x%08x, input_size=0x%lx, output_size=0x%lx", command, - input.size(), output.size()); + LOG_DEBUG(Service_NVDRV, "called, command=0x%08x, input_size=0x%zx, output_size=0x%zx", + command.raw, input.size(), output.size()); switch (static_cast(command.raw)) { case IoctlCommand::IocGetConfigCommand: -- cgit v1.2.3 From 983777a3179b6e65d37c6432a601185b5827706b Mon Sep 17 00:00:00 2001 From: Lioncash Date: Wed, 14 Feb 2018 00:47:51 -0500 Subject: nvhost_gpu: Silence formatting specifier warnings --- src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'src/core/hle') diff --git a/src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp b/src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp index 0b2ebd466..da44c65f3 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp +++ b/src/core/hle/service/nvdrv/devices/nvhost_gpu.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/logging/log.h" @@ -13,8 +14,8 @@ namespace Nvidia { namespace Devices { u32 nvhost_gpu::ioctl(Ioctl command, const std::vector& input, std::vector& output) { - LOG_DEBUG(Service_NVDRV, "called, command=0x%08x, input_size=0x%llx, output_size=0x%llx", - command, input.size(), output.size()); + LOG_DEBUG(Service_NVDRV, "called, command=0x%08x, input_size=0x%zx, output_size=0x%zx", + command.raw, input.size(), output.size()); switch (static_cast(command.raw)) { case IoctlCommand::IocSetNVMAPfdCommand: @@ -74,7 +75,8 @@ u32 nvhost_gpu::GetClientData(const std::vector& input, std::vector& out u32 nvhost_gpu::ZCullBind(const std::vector& input, std::vector& output) { std::memcpy(&zcull_params, input.data(), input.size()); - LOG_DEBUG(Service_NVDRV, "called, gpu_va=%lx, mode=%x", zcull_params.gpu_va, zcull_params.mode); + LOG_DEBUG(Service_NVDRV, "called, gpu_va=%" PRIx64 ", mode=%x", zcull_params.gpu_va, + zcull_params.mode); std::memcpy(output.data(), &zcull_params, output.size()); return 0; } @@ -82,8 +84,8 @@ u32 nvhost_gpu::ZCullBind(const std::vector& input, std::vector& output) u32 nvhost_gpu::SetErrorNotifier(const std::vector& input, std::vector& output) { IoctlSetErrorNotifier params{}; std::memcpy(¶ms, input.data(), input.size()); - LOG_WARNING(Service_NVDRV, "(STUBBED) called, offset=%lx, size=%lx, mem=%x", params.offset, - params.size, params.mem); + LOG_WARNING(Service_NVDRV, "(STUBBED) called, offset=%" PRIx64 ", size=%" PRIx64 ", mem=%x", + params.offset, params.size, params.mem); std::memcpy(output.data(), ¶ms, output.size()); return 0; } @@ -123,7 +125,7 @@ u32 nvhost_gpu::SubmitGPFIFO(const std::vector& input, std::vector& outp UNIMPLEMENTED(); IoctlSubmitGpfifo params{}; std::memcpy(¶ms, input.data(), sizeof(IoctlSubmitGpfifo)); - LOG_WARNING(Service_NVDRV, "(STUBBED) called, gpfifo=%lx, num_entries=%x, flags=%x", + LOG_WARNING(Service_NVDRV, "(STUBBED) called, gpfifo=%" PRIx64 ", num_entries=%x, flags=%x", params.gpfifo, params.num_entries, params.flags); auto entries = std::vector(); -- cgit v1.2.3 From ee170cbcead1aa19ca88a4884f2df13324874adf Mon Sep 17 00:00:00 2001 From: Lioncash Date: Wed, 14 Feb 2018 00:49:35 -0500 Subject: nvmap: Silence formatting specifier warnings --- src/core/hle/service/nvdrv/devices/nvmap.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/core/hle') diff --git a/src/core/hle/service/nvdrv/devices/nvmap.cpp b/src/core/hle/service/nvdrv/devices/nvmap.cpp index 02b33374a..cd8c0c605 100644 --- a/src/core/hle/service/nvdrv/devices/nvmap.cpp +++ b/src/core/hle/service/nvdrv/devices/nvmap.cpp @@ -3,6 +3,7 @@ // Refer to the license.txt file included. #include +#include #include "common/assert.h" #include "common/logging/log.h" @@ -71,7 +72,7 @@ u32 nvmap::IocAlloc(const std::vector& input, std::vector& output) { object->addr = params.addr; object->status = Object::Status::Allocated; - LOG_DEBUG(Service_NVDRV, "called, addr=0x%llx", params.addr); + LOG_DEBUG(Service_NVDRV, "called, addr=0x%" PRIx64, params.addr); std::memcpy(output.data(), ¶ms, sizeof(params)); return 0; -- cgit v1.2.3 From eba57fce88ea3c1253d2480bc4a3b8942ec58a5d Mon Sep 17 00:00:00 2001 From: Lioncash Date: Wed, 14 Feb 2018 00:51:42 -0500 Subject: nvdrv/interface: Silence formatting specifier warnings --- src/core/hle/service/nvdrv/interface.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/core/hle') diff --git a/src/core/hle/service/nvdrv/interface.cpp b/src/core/hle/service/nvdrv/interface.cpp index 367791da6..1a5efaeaf 100644 --- a/src/core/hle/service/nvdrv/interface.cpp +++ b/src/core/hle/service/nvdrv/interface.cpp @@ -2,6 +2,7 @@ // Licensed under GPLv2 or any later version // Refer to the license.txt file included. +#include #include "common/logging/log.h" #include "core/hle/ipc_helpers.h" #include "core/hle/kernel/event.h" @@ -88,7 +89,7 @@ void NVDRV::SetClientPID(Kernel::HLERequestContext& ctx) { IPC::RequestParser rp{ctx}; pid = rp.Pop(); - LOG_WARNING(Service_NVDRV, "(STUBBED) called, pid=0x%lx", pid); + LOG_WARNING(Service_NVDRV, "(STUBBED) called, pid=0x%" PRIx64, pid); IPC::ResponseBuilder rb{ctx, 3}; rb.Push(RESULT_SUCCESS); rb.Push(0); -- cgit v1.2.3