Compare commits

...

10 Commits

Author SHA1 Message Date
N00byKing
8c7d58eb3e Merge ea5b35a630 into 299f943202 2018-04-24 15:56:36 +00:00
N00byKing
ea5b35a630 Ran clang-format 2018-04-07 12:12:45 +02:00
N00byKing
91322e3bcd Add cinttypes Include for Source Files affected by Warning Cleanups 2018-04-07 12:12:45 +02:00
N00byKing
771e8cfd6b svc.cpp: Correct Variable Types 2018-04-07 12:10:19 +02:00
N00byKing
b94c495c23 nvdisp_disp0.cpp: Correct Variable Type 2018-04-07 12:10:19 +02:00
N00byKing
4f45534dec shared_memory.cpp: Correct Variable Types 2018-04-07 12:10:19 +02:00
N00byKing
493391818d object_address_table.cpp: Correct Variable Types 2018-04-07 12:09:00 +02:00
N00byKing
0236d34a72 arm_unicorn.cpp: Correct Variable Types 2018-04-07 12:09:00 +02:00
N00byKing
32b62d709a fsp_srv.cpp: Correct Log Variable type for "unk" 2018-04-07 12:08:59 +02:00
N00byKing
e00f7cdfc4 renderer_opengl.cpp: Cast framebuffer_transform_flags 2018-04-07 12:08:59 +02:00
8 changed files with 27 additions and 14 deletions

View File

@@ -3,6 +3,7 @@
// Refer to the license.txt file included.
#include <algorithm>
#include <cinttypes>
#include <unicorn/arm64.h>
#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 {};
}

View File

@@ -2,6 +2,7 @@
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.
#include <cinttypes>
#include <boost/range/algorithm_ext/erase.hpp>
#include "common/assert.h"
#include "common/common_funcs.h"

View File

@@ -2,6 +2,7 @@
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.
#include <cinttypes>
#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<Object> 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);
}

View File

@@ -2,6 +2,7 @@
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.
#include <cinttypes>
#include <cstring>
#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<u32>(permissions) & ~static_cast<u32>(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<u32>(this->permissions) & ~static_cast<u32>(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();
}

View File

@@ -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;
}

View File

@@ -197,7 +197,7 @@ private:
IPC::RequestParser rp{ctx};
const u64 unk = rp.Pop<u64>();
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);

View File

@@ -2,6 +2,7 @@
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.
#include <cinttypes>
#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{

View File

@@ -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<int>(framebuffer_transform_flags));
UNIMPLEMENTED();
}
}