summaryrefslogtreecommitdiff
path: root/src/core/hle/kernel
diff options
context:
space:
mode:
authorGravatar bunnei2018-03-19 16:29:03 -0400
committerGravatar GitHub2018-03-19 16:29:03 -0400
commita90ab1dec7b4b4cefc73115310dec57363114a05 (patch)
tree45ebd96f672851f816aca4b09b599df5ee8f8c5c /src/core/hle/kernel
parentMerge pull request #251 from Subv/tic_tsc (diff)
parentClang Fixes (diff)
downloadyuzu-a90ab1dec7b4b4cefc73115310dec57363114a05.tar.gz
yuzu-a90ab1dec7b4b4cefc73115310dec57363114a05.tar.xz
yuzu-a90ab1dec7b4b4cefc73115310dec57363114a05.zip
Merge pull request #252 from N00byKing/3064
Implement Pull #3064 from citra: Clean all format warnings (Yuzu-specific format warnings cleared too)
Diffstat (limited to 'src/core/hle/kernel')
-rw-r--r--src/core/hle/kernel/hle_ipc.cpp2
-rw-r--r--src/core/hle/kernel/object_address_table.cpp4
-rw-r--r--src/core/hle/kernel/server_session.cpp3
-rw-r--r--src/core/hle/kernel/shared_memory.cpp13
-rw-r--r--src/core/hle/kernel/svc.cpp4
5 files changed, 13 insertions, 13 deletions
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<u8> HLERequestContext::ReadBuffer() const {
269size_t HLERequestContext::WriteBuffer(const void* buffer, size_t size) const { 269size_t HLERequestContext::WriteBuffer(const void* buffer, size_t size) const {
270 const bool is_buffer_b{BufferDescriptorB().size() && BufferDescriptorB()[0].Size()}; 270 const bool is_buffer_b{BufferDescriptorB().size() && BufferDescriptorB()[0].Size()};
271 271
272 ASSERT_MSG(size <= GetWriteBufferSize(), "Size %d is too big", size); 272 ASSERT_MSG(size <= GetWriteBufferSize(), "Size %lx is too big", size);
273 273
274 if (is_buffer_b) { 274 if (is_buffer_b) {
275 Memory::WriteBlock(BufferDescriptorB()[0].Address(), buffer, size); 275 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 {
10ObjectAddressTable g_object_address_table; 10ObjectAddressTable g_object_address_table;
11 11
12void ObjectAddressTable::Insert(VAddr addr, SharedPtr<Object> obj) { 12void ObjectAddressTable::Insert(VAddr addr, SharedPtr<Object> obj) {
13 ASSERT_MSG(objects.find(addr) == objects.end(), "Object already exists with addr=0x%llx", addr); 13 ASSERT_MSG(objects.find(addr) == objects.end(), "Object already exists with addr=0x%lx", addr);
14 objects[addr] = obj; 14 objects[addr] = obj;
15} 15}
16 16
17void ObjectAddressTable::Close(VAddr addr) { 17void ObjectAddressTable::Close(VAddr addr) {
18 ASSERT_MSG(objects.find(addr) != objects.end(), "Object does not exist with addr=0x%llx", addr); 18 ASSERT_MSG(objects.find(addr) != objects.end(), "Object does not exist with addr=0x%lx", addr);
19 objects.erase(addr); 19 objects.erase(addr);
20} 20}
21 21
diff --git a/src/core/hle/kernel/server_session.cpp b/src/core/hle/kernel/server_session.cpp
index 9b4a0ef0a..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
78 } 78 }
79 } 79 }
80 80
81 LOG_CRITICAL(IPC, "Unknown domain command=%d", domain_message_header->command.Value()); 81 LOG_CRITICAL(IPC, "Unknown domain command=%d",
82 static_cast<int>(domain_message_header->command.Value()));
82 ASSERT(false); 83 ASSERT(false);
83 } 84 }
84 85
diff --git a/src/core/hle/kernel/shared_memory.cpp b/src/core/hle/kernel/shared_memory.cpp
index 4d6cd7462..88230bdd9 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
107 107
108 // Error out if the requested permissions don't match what the creator process allows. 108 // Error out if the requested permissions don't match what the creator process allows.
109 if (static_cast<u32>(permissions) & ~static_cast<u32>(own_other_permissions)) { 109 if (static_cast<u32>(permissions) & ~static_cast<u32>(own_other_permissions)) {
110 LOG_ERROR(Kernel, "cannot map id=%u, address=0x%llx name=%s, permissions don't match", 110 LOG_ERROR(Kernel, "cannot map id=%u, address=0x%lx name=%s, permissions don't match",
111 GetObjectId(), address, name.c_str()); 111 GetObjectId(), address, name.c_str());
112 return ERR_INVALID_COMBINATION; 112 return ERR_INVALID_COMBINATION;
113 } 113 }
@@ -115,7 +115,7 @@ ResultCode SharedMemory::Map(Process* target_process, VAddr address, MemoryPermi
115 // Error out if the provided permissions are not compatible with what the creator process needs. 115 // Error out if the provided permissions are not compatible with what the creator process needs.
116 if (other_permissions != MemoryPermission::DontCare && 116 if (other_permissions != MemoryPermission::DontCare &&
117 static_cast<u32>(this->permissions) & ~static_cast<u32>(other_permissions)) { 117 static_cast<u32>(this->permissions) & ~static_cast<u32>(other_permissions)) {
118 LOG_ERROR(Kernel, "cannot map id=%u, address=0x%llx name=%s, permissions don't match", 118 LOG_ERROR(Kernel, "cannot map id=%u, address=0x%lx name=%s, permissions don't match",
119 GetObjectId(), address, name.c_str()); 119 GetObjectId(), address, name.c_str());
120 return ERR_WRONG_PERMISSION; 120 return ERR_WRONG_PERMISSION;
121 } 121 }
@@ -126,7 +126,7 @@ ResultCode SharedMemory::Map(Process* target_process, VAddr address, MemoryPermi
126 if (address != 0) { 126 if (address != 0) {
127 // TODO(shinyquagsire23): Check for virtual/mappable memory here too? 127 // TODO(shinyquagsire23): Check for virtual/mappable memory here too?
128 if (address >= Memory::HEAP_VADDR && address < Memory::HEAP_VADDR_END) { 128 if (address >= Memory::HEAP_VADDR && address < Memory::HEAP_VADDR_END) {
129 LOG_ERROR(Kernel, "cannot map id=%u, address=0x%llx name=%s, invalid address", 129 LOG_ERROR(Kernel, "cannot map id=%u, address=0x%lx name=%s, invalid address",
130 GetObjectId(), address, name.c_str()); 130 GetObjectId(), address, name.c_str());
131 return ERR_INVALID_ADDRESS; 131 return ERR_INVALID_ADDRESS;
132 } 132 }
@@ -143,10 +143,9 @@ ResultCode SharedMemory::Map(Process* target_process, VAddr address, MemoryPermi
143 auto result = target_process->vm_manager.MapMemoryBlock( 143 auto result = target_process->vm_manager.MapMemoryBlock(
144 target_address, backing_block, backing_block_offset, size, MemoryState::Shared); 144 target_address, backing_block, backing_block_offset, size, MemoryState::Shared);
145 if (result.Failed()) { 145 if (result.Failed()) {
146 LOG_ERROR( 146 LOG_ERROR(Kernel,
147 Kernel, 147 "cannot map id=%u, target_address=0x%lx name=%s, error mapping to virtual memory",
148 "cannot map id=%u, target_address=0x%llx name=%s, error mapping to virtual memory", 148 GetObjectId(), target_address, name.c_str());
149 GetObjectId(), target_address, name.c_str());
150 return result.Code(); 149 return result.Code();
151 } 150 }
152 151
diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp
index 118ce3ee5..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) {
39} 39}
40 40
41static ResultCode SetMemoryAttribute(VAddr addr, u64 size, u32 state0, u32 state1) { 41static ResultCode SetMemoryAttribute(VAddr addr, u64 size, u32 state0, u32 state1) {
42 LOG_WARNING(Kernel_SVC, "(STUBBED) called, addr=0x%llx", addr); 42 LOG_WARNING(Kernel_SVC, "(STUBBED) called, addr=0x%lx", addr);
43 return RESULT_SUCCESS; 43 return RESULT_SUCCESS;
44} 44}
45 45
@@ -750,7 +750,7 @@ static ResultCode ResetSignal(Handle handle) {
750 750
751/// Creates a TransferMemory object 751/// Creates a TransferMemory object
752static ResultCode CreateTransferMemory(Handle* handle, VAddr addr, u64 size, u32 permissions) { 752static ResultCode CreateTransferMemory(Handle* handle, VAddr addr, u64 size, u32 permissions) {
753 LOG_WARNING(Kernel_SVC, "(STUBBED) called addr=0x%llx, size=0x%llx, perms=%08X", addr, size, 753 LOG_WARNING(Kernel_SVC, "(STUBBED) called addr=0x%lx, size=0x%lx, perms=%08X", addr, size,
754 permissions); 754 permissions);
755 *handle = 0; 755 *handle = 0;
756 return RESULT_SUCCESS; 756 return RESULT_SUCCESS;