From ef875d6a356fef22d52ec2cdf2a326297740ff66 Mon Sep 17 00:00:00 2001 From: N00byKing Date: Mon, 19 Mar 2018 17:07:08 +0100 Subject: Clean Warnings (?) --- src/core/hle/kernel/hle_ipc.cpp | 2 +- src/core/hle/kernel/object_address_table.cpp | 4 ++-- src/core/hle/kernel/server_session.cpp | 2 +- src/core/hle/kernel/shared_memory.cpp | 6 +++--- src/core/hle/kernel/svc.cpp | 2 +- src/core/hle/service/filesystem/fsp_srv.cpp | 6 +++--- src/core/hle/service/nvdrv/devices/nvdisp_disp0.cpp | 2 +- src/core/hle/service/service.cpp | 2 +- src/core/hle/service/time/time.cpp | 2 +- src/core/hle/service/vi/vi.cpp | 2 +- 10 files changed, 15 insertions(+), 15 deletions(-) (limited to 'src/core/hle') diff --git a/src/core/hle/kernel/hle_ipc.cpp b/src/core/hle/kernel/hle_ipc.cpp index 293756790..ffcbfe64f 100644 --- a/src/core/hle/kernel/hle_ipc.cpp +++ b/src/core/hle/kernel/hle_ipc.cpp @@ -269,7 +269,7 @@ std::vector HLERequestContext::ReadBuffer() const { size_t HLERequestContext::WriteBuffer(const void* buffer, size_t size) const { const bool is_buffer_b{BufferDescriptorB().size() && BufferDescriptorB()[0].Size()}; - ASSERT_MSG(size <= GetWriteBufferSize(), "Size %d is too big", size); + ASSERT_MSG(size <= GetWriteBufferSize(), "Size %lx is too big", size); if (is_buffer_b) { Memory::WriteBlock(BufferDescriptorB()[0].Address(), buffer, size); diff --git a/src/core/hle/kernel/object_address_table.cpp b/src/core/hle/kernel/object_address_table.cpp index 434c16add..cd286f85d 100644 --- a/src/core/hle/kernel/object_address_table.cpp +++ b/src/core/hle/kernel/object_address_table.cpp @@ -10,12 +10,12 @@ 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%llx", addr); + ASSERT_MSG(objects.find(addr) == objects.end(), "Object already exists with addr=0x%lx", addr); objects[addr] = obj; } void ObjectAddressTable::Close(VAddr addr) { - ASSERT_MSG(objects.find(addr) != objects.end(), "Object does not exist with addr=0x%llx", addr); + ASSERT_MSG(objects.find(addr) != objects.end(), "Object does not exist with addr=0x%lx", addr); objects.erase(addr); } diff --git a/src/core/hle/kernel/server_session.cpp b/src/core/hle/kernel/server_session.cpp index 9b4a0ef0a..9d6fe0cf2 100644 --- a/src/core/hle/kernel/server_session.cpp +++ b/src/core/hle/kernel/server_session.cpp @@ -78,7 +78,7 @@ ResultCode ServerSession::HandleDomainSyncRequest(Kernel::HLERequestContext& con } } - LOG_CRITICAL(IPC, "Unknown domain command=%d", domain_message_header->command.Value()); + LOG_CRITICAL(IPC, "Unknown domain command=%d", static_cast(domain_message_header->command.Value())); ASSERT(false); } diff --git a/src/core/hle/kernel/shared_memory.cpp b/src/core/hle/kernel/shared_memory.cpp index 4d6cd7462..1875dd8d0 100644 --- a/src/core/hle/kernel/shared_memory.cpp +++ b/src/core/hle/kernel/shared_memory.cpp @@ -107,7 +107,7 @@ 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%llx name=%s, permissions don't match", + LOG_ERROR(Kernel, "cannot map id=%u, address=0x%lx name=%s, permissions don't match", GetObjectId(), address, name.c_str()); return ERR_INVALID_COMBINATION; } @@ -115,7 +115,7 @@ 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%llx name=%s, permissions don't match", + LOG_ERROR(Kernel, "cannot map id=%u, address=0x%lx name=%s, permissions don't match", GetObjectId(), address, name.c_str()); return ERR_WRONG_PERMISSION; } @@ -145,7 +145,7 @@ ResultCode SharedMemory::Map(Process* target_process, VAddr address, MemoryPermi if (result.Failed()) { LOG_ERROR( Kernel, - "cannot map id=%u, target_address=0x%llx name=%s, error mapping to virtual memory", + "cannot map id=%u, target_address=0x%lx 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 118ce3ee5..062bcf29e 100644 --- a/src/core/hle/kernel/svc.cpp +++ b/src/core/hle/kernel/svc.cpp @@ -750,7 +750,7 @@ 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%llx, size=0x%llx, perms=%08X", addr, size, + LOG_WARNING(Kernel_SVC, "(STUBBED) called addr=0x%lx, size=0x%lx, 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 97b3fa290..470b6350e 100644 --- a/src/core/hle/service/filesystem/fsp_srv.cpp +++ b/src/core/hle/service/filesystem/fsp_srv.cpp @@ -35,7 +35,7 @@ private: const s64 offset = rp.Pop(); const s64 length = rp.Pop(); - LOG_DEBUG(Service_FS, "called, offset=0x%llx, length=0x%llx", offset, length); + LOG_DEBUG(Service_FS, "called, offset=0x%l, length=0x%l", offset, length); // Error checking if (length < 0) { @@ -86,7 +86,7 @@ private: const s64 offset = rp.Pop(); const s64 length = rp.Pop(); - LOG_DEBUG(Service_FS, "called, offset=0x%llx, length=0x%llx", offset, length); + LOG_DEBUG(Service_FS, "called, offset=0x%l, length=0x%l", offset, length); // Error checking if (length < 0) { @@ -123,7 +123,7 @@ private: const s64 offset = rp.Pop(); const s64 length = rp.Pop(); - LOG_DEBUG(Service_FS, "called, offset=0x%llx, length=0x%llx", offset, length); + LOG_DEBUG(Service_FS, "called, offset=0x%l, length=0x%l", offset, length); // Error checking if (length < 0) { diff --git a/src/core/hle/service/nvdrv/devices/nvdisp_disp0.cpp b/src/core/hle/service/nvdrv/devices/nvdisp_disp0.cpp index 7674d332d..e48f13fa1 100644 --- a/src/core/hle/service/nvdrv/devices/nvdisp_disp0.cpp +++ b/src/core/hle/service/nvdrv/devices/nvdisp_disp0.cpp @@ -23,7 +23,7 @@ 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 %llx offset %08X Width %u Height %u Stride %u Format %u", + "Drawing from address %lx offset %08X Width %u Height %u Stride %u Format %u", addr, offset, width, height, stride, format); using PixelFormat = RendererBase::FramebufferInfo::PixelFormat; diff --git a/src/core/hle/service/service.cpp b/src/core/hle/service/service.cpp index a1ca8a033..d4b08aadf 100644 --- a/src/core/hle/service/service.cpp +++ b/src/core/hle/service/service.cpp @@ -149,7 +149,7 @@ ResultCode ServiceFrameworkBase::HandleSyncRequest(Kernel::HLERequestContext& co break; } default: - UNIMPLEMENTED_MSG("command_type=%d", context.GetCommandType()); + UNIMPLEMENTED_MSG("command_type=%d", static_cast(context.GetCommandType())); } context.WriteToOutgoingCommandBuffer(*Kernel::GetCurrentThread()); diff --git a/src/core/hle/service/time/time.cpp b/src/core/hle/service/time/time.cpp index ad49f4265..c3e46f866 100644 --- a/src/core/hle/service/time/time.cpp +++ b/src/core/hle/service/time/time.cpp @@ -107,7 +107,7 @@ private: IPC::RequestParser rp{ctx}; u64 posix_time = rp.Pop(); - LOG_WARNING(Service_Time, "(STUBBED) called, posix_time=0x%016llX", posix_time); + LOG_WARNING(Service_Time, "(STUBBED) called, posix_time=0x%016lX", posix_time); CalendarTime calendar_time{2018, 1, 1, 0, 0, 0}; CalendarAdditionalInfo additional_info{}; diff --git a/src/core/hle/service/vi/vi.cpp b/src/core/hle/service/vi/vi.cpp index 7b6453447..6135eabf8 100644 --- a/src/core/hle/service/vi/vi.cpp +++ b/src/core/hle/service/vi/vi.cpp @@ -471,7 +471,7 @@ private: u32 flags = rp.Pop(); auto buffer_queue = nv_flinger->GetBufferQueue(id); - LOG_DEBUG(Service_VI, "called, transaction=%x", transaction); + LOG_DEBUG(Service_VI, "called, transaction=%x", static_cast(transaction)); if (transaction == TransactionId::Connect) { IGBPConnectRequestParcel request{ctx.ReadBuffer()}; -- cgit v1.2.3 From 0e72d0d82622deb503f05fd0b76790b8ab147404 Mon Sep 17 00:00:00 2001 From: N00byKing Date: Mon, 19 Mar 2018 17:27:04 +0100 Subject: More Warning cleanups --- src/core/hle/kernel/shared_memory.cpp | 2 +- src/core/hle/kernel/svc.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/core/hle') diff --git a/src/core/hle/kernel/shared_memory.cpp b/src/core/hle/kernel/shared_memory.cpp index 1875dd8d0..c8bda8494 100644 --- a/src/core/hle/kernel/shared_memory.cpp +++ b/src/core/hle/kernel/shared_memory.cpp @@ -126,7 +126,7 @@ ResultCode SharedMemory::Map(Process* target_process, VAddr address, MemoryPermi if (address != 0) { // TODO(shinyquagsire23): Check for virtual/mappable memory here too? if (address >= Memory::HEAP_VADDR && address < Memory::HEAP_VADDR_END) { - LOG_ERROR(Kernel, "cannot map id=%u, address=0x%llx name=%s, invalid address", + LOG_ERROR(Kernel, "cannot map id=%u, address=0x%lx name=%s, invalid address", GetObjectId(), address, name.c_str()); return ERR_INVALID_ADDRESS; } diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp index 062bcf29e..311ab4187 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%llx", addr); + LOG_WARNING(Kernel_SVC, "(STUBBED) called, addr=0x%lx", addr); return RESULT_SUCCESS; } -- cgit v1.2.3 From d16e08454dbf47bcf8524fdc3ea97c3f8bd32305 Mon Sep 17 00:00:00 2001 From: N00byKing Date: Mon, 19 Mar 2018 17:43:04 +0100 Subject: oops --- src/core/hle/service/filesystem/fsp_srv.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/core/hle') diff --git a/src/core/hle/service/filesystem/fsp_srv.cpp b/src/core/hle/service/filesystem/fsp_srv.cpp index 470b6350e..e5ce41671 100644 --- a/src/core/hle/service/filesystem/fsp_srv.cpp +++ b/src/core/hle/service/filesystem/fsp_srv.cpp @@ -35,7 +35,7 @@ private: const s64 offset = rp.Pop(); const s64 length = rp.Pop(); - LOG_DEBUG(Service_FS, "called, offset=0x%l, length=0x%l", offset, length); + LOG_DEBUG(Service_FS, "called, offset=0x%ld, length=0x%ld", offset, length); // Error checking if (length < 0) { @@ -86,7 +86,7 @@ private: const s64 offset = rp.Pop(); const s64 length = rp.Pop(); - LOG_DEBUG(Service_FS, "called, offset=0x%l, length=0x%l", offset, length); + LOG_DEBUG(Service_FS, "called, offset=0x%ld, length=0x%ld", offset, length); // Error checking if (length < 0) { @@ -123,7 +123,7 @@ private: const s64 offset = rp.Pop(); const s64 length = rp.Pop(); - LOG_DEBUG(Service_FS, "called, offset=0x%l, length=0x%l", offset, length); + LOG_DEBUG(Service_FS, "called, offset=0x%ld, length=0x%ld", offset, length); // Error checking if (length < 0) { -- cgit v1.2.3 From 1d8b6ad13b4808034298b856c24a78d4d87acac2 Mon Sep 17 00:00:00 2001 From: N00byKing Date: Mon, 19 Mar 2018 17:53:35 +0100 Subject: Clang Fixes --- src/core/hle/kernel/server_session.cpp | 3 ++- src/core/hle/kernel/shared_memory.cpp | 7 +++---- src/core/hle/service/nvdrv/devices/nvdisp_disp0.cpp | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) (limited to 'src/core/hle') diff --git a/src/core/hle/kernel/server_session.cpp b/src/core/hle/kernel/server_session.cpp index 9d6fe0cf2..33397d84f 100644 --- a/src/core/hle/kernel/server_session.cpp +++ b/src/core/hle/kernel/server_session.cpp @@ -78,7 +78,8 @@ ResultCode ServerSession::HandleDomainSyncRequest(Kernel::HLERequestContext& con } } - LOG_CRITICAL(IPC, "Unknown domain command=%d", static_cast(domain_message_header->command.Value())); + LOG_CRITICAL(IPC, "Unknown domain command=%d", + static_cast(domain_message_header->command.Value())); ASSERT(false); } diff --git a/src/core/hle/kernel/shared_memory.cpp b/src/core/hle/kernel/shared_memory.cpp index c8bda8494..88230bdd9 100644 --- a/src/core/hle/kernel/shared_memory.cpp +++ b/src/core/hle/kernel/shared_memory.cpp @@ -143,10 +143,9 @@ ResultCode SharedMemory::Map(Process* target_process, VAddr address, MemoryPermi auto result = target_process->vm_manager.MapMemoryBlock( 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", - GetObjectId(), target_address, name.c_str()); + LOG_ERROR(Kernel, + "cannot map id=%u, target_address=0x%lx name=%s, error mapping to virtual memory", + GetObjectId(), target_address, name.c_str()); return result.Code(); } diff --git a/src/core/hle/service/nvdrv/devices/nvdisp_disp0.cpp b/src/core/hle/service/nvdrv/devices/nvdisp_disp0.cpp index e48f13fa1..94530724e 100644 --- a/src/core/hle/service/nvdrv/devices/nvdisp_disp0.cpp +++ b/src/core/hle/service/nvdrv/devices/nvdisp_disp0.cpp @@ -23,8 +23,8 @@ 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 %lx offset %08X Width %u Height %u Stride %u Format %u", addr, + offset, width, height, stride, format); using PixelFormat = RendererBase::FramebufferInfo::PixelFormat; using Flags = NVFlinger::BufferQueue::BufferTransformFlags; -- cgit v1.2.3