summaryrefslogtreecommitdiff
path: root/src/core/hle/kernel
diff options
context:
space:
mode:
authorGravatar bunnei2018-02-14 10:07:03 -0500
committerGravatar GitHub2018-02-14 10:07:03 -0500
commitd939792b9b7b81953b7ddc7df1a86a9e9e3c9add (patch)
tree99b757106b78913075fd954d6c85d296aa3c9c57 /src/core/hle/kernel
parentMerge pull request #189 from lioncash/misc (diff)
parentmemory: Silence formatting sepecifier warnings (diff)
downloadyuzu-d939792b9b7b81953b7ddc7df1a86a9e9e3c9add.tar.gz
yuzu-d939792b9b7b81953b7ddc7df1a86a9e9e3c9add.tar.xz
yuzu-d939792b9b7b81953b7ddc7df1a86a9e9e3c9add.zip
Merge pull request #191 from lioncash/log
core: Silence formatting specifier warnings
Diffstat (limited to 'src/core/hle/kernel')
-rw-r--r--src/core/hle/kernel/thread.cpp5
-rw-r--r--src/core/hle/kernel/vm_manager.cpp12
2 files changed, 10 insertions, 7 deletions
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 @@
3// Refer to the license.txt file included. 3// Refer to the license.txt file included.
4 4
5#include <algorithm> 5#include <algorithm>
6#include <cinttypes>
6#include <list> 7#include <list>
7#include <vector> 8#include <vector>
8#include "common/assert.h" 9#include "common/assert.h"
@@ -379,7 +380,7 @@ ResultVal<SharedPtr<Thread>> Thread::Create(std::string name, VAddr entry_point,
379 SharedPtr<Process> owner_process) { 380 SharedPtr<Process> owner_process) {
380 // Check if priority is in ranged. Lowest priority -> highest priority id. 381 // Check if priority is in ranged. Lowest priority -> highest priority id.
381 if (priority > THREADPRIO_LOWEST) { 382 if (priority > THREADPRIO_LOWEST) {
382 LOG_ERROR(Kernel_SVC, "Invalid thread priority: %d", priority); 383 LOG_ERROR(Kernel_SVC, "Invalid thread priority: %u", priority);
383 return ERR_OUT_OF_RANGE; 384 return ERR_OUT_OF_RANGE;
384 } 385 }
385 386
@@ -391,7 +392,7 @@ ResultVal<SharedPtr<Thread>> Thread::Create(std::string name, VAddr entry_point,
391 // TODO(yuriks): Other checks, returning 0xD9001BEA 392 // TODO(yuriks): Other checks, returning 0xD9001BEA
392 393
393 if (!Memory::IsValidVirtualAddress(*owner_process, entry_point)) { 394 if (!Memory::IsValidVirtualAddress(*owner_process, entry_point)) {
394 LOG_ERROR(Kernel_SVC, "(name=%s): invalid entry %08x", name.c_str(), entry_point); 395 LOG_ERROR(Kernel_SVC, "(name=%s): invalid entry %016" PRIx64, name.c_str(), entry_point);
395 // TODO (bunnei): Find the correct error code to use here 396 // TODO (bunnei): Find the correct error code to use here
396 return ResultCode(-1); 397 return ResultCode(-1);
397 } 398 }
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 @@
2// Licensed under GPLv2 or any later version 2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included. 3// Refer to the license.txt file included.
4 4
5#include <cinttypes>
5#include <iterator> 6#include <iterator>
6#include "common/assert.h" 7#include "common/assert.h"
7#include "common/logging/log.h" 8#include "common/logging/log.h"
@@ -206,7 +207,8 @@ void VMManager::RefreshMemoryBlockMappings(const std::vector<u8>* block) {
206void VMManager::LogLayout(Log::Level log_level) const { 207void VMManager::LogLayout(Log::Level log_level) const {
207 for (const auto& p : vma_map) { 208 for (const auto& p : vma_map) {
208 const VirtualMemoryArea& vma = p.second; 209 const VirtualMemoryArea& vma = p.second;
209 LOG_GENERIC(Log::Class::Kernel, log_level, "%08X - %08X size: %8X %c%c%c %s", vma.base, 210 LOG_GENERIC(Log::Class::Kernel, log_level,
211 "%016" PRIx64 " - %016" PRIx64 " size: %16" PRIx64 " %c%c%c %s", vma.base,
210 vma.base + vma.size, vma.size, 212 vma.base + vma.size, vma.size,
211 (u8)vma.permissions & (u8)VMAPermission::Read ? 'R' : '-', 213 (u8)vma.permissions & (u8)VMAPermission::Read ? 'R' : '-',
212 (u8)vma.permissions & (u8)VMAPermission::Write ? 'W' : '-', 214 (u8)vma.permissions & (u8)VMAPermission::Write ? 'W' : '-',
@@ -222,8 +224,8 @@ VMManager::VMAIter VMManager::StripIterConstness(const VMAHandle& iter) {
222} 224}
223 225
224ResultVal<VMManager::VMAIter> VMManager::CarveVMA(VAddr base, u64 size) { 226ResultVal<VMManager::VMAIter> VMManager::CarveVMA(VAddr base, u64 size) {
225 ASSERT_MSG((size & Memory::PAGE_MASK) == 0, "non-page aligned size: 0x%8X", size); 227 ASSERT_MSG((size & Memory::PAGE_MASK) == 0, "non-page aligned size: 0x%16" PRIx64, size);
226 ASSERT_MSG((base & Memory::PAGE_MASK) == 0, "non-page aligned base: 0x%08X", base); 228 ASSERT_MSG((base & Memory::PAGE_MASK) == 0, "non-page aligned base: 0x%016" PRIx64, base);
227 229
228 VMAIter vma_handle = StripIterConstness(FindVMA(base)); 230 VMAIter vma_handle = StripIterConstness(FindVMA(base));
229 if (vma_handle == vma_map.end()) { 231 if (vma_handle == vma_map.end()) {
@@ -258,8 +260,8 @@ ResultVal<VMManager::VMAIter> VMManager::CarveVMA(VAddr base, u64 size) {
258} 260}
259 261
260ResultVal<VMManager::VMAIter> VMManager::CarveVMARange(VAddr target, u64 size) { 262ResultVal<VMManager::VMAIter> VMManager::CarveVMARange(VAddr target, u64 size) {
261 ASSERT_MSG((size & Memory::PAGE_MASK) == 0, "non-page aligned size: 0x%8X", size); 263 ASSERT_MSG((size & Memory::PAGE_MASK) == 0, "non-page aligned size: 0x%16" PRIx64, size);
262 ASSERT_MSG((target & Memory::PAGE_MASK) == 0, "non-page aligned base: 0x%08X", target); 264 ASSERT_MSG((target & Memory::PAGE_MASK) == 0, "non-page aligned base: 0x%016" PRIx64, target);
263 265
264 VAddr target_end = target + size; 266 VAddr target_end = target + size;
265 ASSERT(target_end >= target); 267 ASSERT(target_end >= target);