citra-emu
/
citra-canary
Archived
1
0
Fork 0

Merge pull request #227 from vaguilar/fix-warnings

Fixed formatting and switch statement warnings
This commit is contained in:
bunnei 2014-11-28 23:08:18 -05:00
commit 83c3d37cd0
7 changed files with 13 additions and 11 deletions

View File

@ -67,6 +67,8 @@ public:
u16str = std::u16string(data, size/2 - 1); // Data is always null-terminated. u16str = std::u16string(data, size/2 - 1); // Data is always null-terminated.
break; break;
} }
default:
break;
} }
} }

View File

@ -50,7 +50,7 @@ bool Archive_SDMC::Initialize() {
* @return Opened file, or nullptr * @return Opened file, or nullptr
*/ */
std::unique_ptr<File> Archive_SDMC::OpenFile(const Path& path, const Mode mode) const { std::unique_ptr<File> Archive_SDMC::OpenFile(const Path& path, const Mode mode) const {
DEBUG_LOG(FILESYS, "called path=%s mode=%d", path.DebugStr().c_str(), mode); DEBUG_LOG(FILESYS, "called path=%s mode=%u", path.DebugStr().c_str(), mode.hex);
File_SDMC* file = new File_SDMC(this, path, mode); File_SDMC* file = new File_SDMC(this, path, mode);
if (!file->Open()) if (!file->Open())
return nullptr; return nullptr;

View File

@ -55,7 +55,7 @@ static void OpenFile(Service::Interface* self) {
u32 filename_ptr = cmd_buff[9]; u32 filename_ptr = cmd_buff[9];
FileSys::Path file_path(filename_type, filename_size, filename_ptr); FileSys::Path file_path(filename_type, filename_size, filename_ptr);
DEBUG_LOG(KERNEL, "path=%s, mode=%d attrs=%d", file_path.DebugStr().c_str(), mode, attributes); DEBUG_LOG(KERNEL, "path=%s, mode=%d attrs=%u", file_path.DebugStr().c_str(), mode.hex, attributes);
ResultVal<Handle> handle = Kernel::OpenFileFromArchive(archive_handle, file_path, mode); ResultVal<Handle> handle = Kernel::OpenFileFromArchive(archive_handle, file_path, mode);
cmd_buff[1] = handle.Code().raw; cmd_buff[1] = handle.Code().raw;
@ -102,8 +102,8 @@ static void OpenFileDirectly(Service::Interface* self) {
FileSys::Path archive_path(archivename_type, archivename_size, archivename_ptr); FileSys::Path archive_path(archivename_type, archivename_size, archivename_ptr);
FileSys::Path file_path(filename_type, filename_size, filename_ptr); FileSys::Path file_path(filename_type, filename_size, filename_ptr);
DEBUG_LOG(KERNEL, "archive_path=%s file_path=%s, mode=%d attributes=%d", DEBUG_LOG(KERNEL, "archive_path=%s file_path=%s, mode=%u attributes=%d",
archive_path.DebugStr().c_str(), file_path.DebugStr().c_str(), mode, attributes); archive_path.DebugStr().c_str(), file_path.DebugStr().c_str(), mode.hex, attributes);
if (archive_path.GetType() != FileSys::Empty) { if (archive_path.GetType() != FileSys::Empty) {
ERROR_LOG(KERNEL, "archive LowPath type other than empty is currently unsupported"); ERROR_LOG(KERNEL, "archive LowPath type other than empty is currently unsupported");

View File

@ -49,7 +49,7 @@ inline void Write(u32 addr, const T data) {
// Writes other than u32 are untested, so I'd rather have them abort than silently fail // Writes other than u32 are untested, so I'd rather have them abort than silently fail
if (index >= Regs::NumIds() || !std::is_same<T,u32>::value) { if (index >= Regs::NumIds() || !std::is_same<T,u32>::value) {
ERROR_LOG(GPU, "unknown Write%lu 0x%08X @ 0x%08X", sizeof(data) * 8, data, addr); ERROR_LOG(GPU, "unknown Write%lu 0x%08X @ 0x%08X", sizeof(data) * 8, (u32)data, addr);
return; return;
} }
@ -140,8 +140,8 @@ inline void Write(u32 addr, const T data) {
DEBUG_LOG(GPU, "DisplayTriggerTransfer: 0x%08x bytes from 0x%08x(%ux%u)-> 0x%08x(%ux%u), dst format %x", DEBUG_LOG(GPU, "DisplayTriggerTransfer: 0x%08x bytes from 0x%08x(%ux%u)-> 0x%08x(%ux%u), dst format %x",
config.output_height * config.output_width * 4, config.output_height * config.output_width * 4,
config.GetPhysicalInputAddress(), config.input_width, config.input_height, config.GetPhysicalInputAddress(), (u32)config.input_width, (u32)config.input_height,
config.GetPhysicalOutputAddress(), config.output_width, config.output_height, config.GetPhysicalOutputAddress(), (u32)config.output_width, (u32)config.output_height,
config.output_format.Value()); config.output_format.Value());
} }
break; break;

View File

@ -68,7 +68,7 @@ inline void Write(u32 addr, const T data) {
break; break;
default: default:
ERROR_LOG(HW, "unknown Write%lu 0x%08X @ 0x%08X", sizeof(data) * 8, data, addr); ERROR_LOG(HW, "unknown Write%lu 0x%08X @ 0x%08X", sizeof(data) * 8, (u32)data, addr);
} }
} }

View File

@ -15,7 +15,7 @@ inline void Read(T &var, const u32 addr) {
template <typename T> template <typename T>
inline void Write(u32 addr, const T data) { inline void Write(u32 addr, const T data) {
ERROR_LOG(NDMA, "unknown Write%lu 0x%08X @ 0x%08X", sizeof(data) * 8, data, addr); ERROR_LOG(NDMA, "unknown Write%lu 0x%08X @ 0x%08X", sizeof(data) * 8, (u32)data, addr);
} }
// Explicitly instantiate template functions because we aren't defining this in the header: // Explicitly instantiate template functions because we aren't defining this in the header:

View File

@ -92,7 +92,7 @@ inline void Read(T &var, const VAddr vaddr) {
var = *((const T*)&g_vram[vaddr & VRAM_MASK]); var = *((const T*)&g_vram[vaddr & VRAM_MASK]);
} else { } else {
ERROR_LOG(MEMMAP, "unknown Read%d @ 0x%08X", sizeof(var) * 8, vaddr); ERROR_LOG(MEMMAP, "unknown Read%lu @ 0x%08X", sizeof(var) * 8, vaddr);
} }
} }
@ -141,7 +141,7 @@ inline void Write(const VAddr vaddr, const T data) {
// Error out... // Error out...
} else { } else {
ERROR_LOG(MEMMAP, "unknown Write%d 0x%08X @ 0x%08X", sizeof(data) * 8, data, vaddr); ERROR_LOG(MEMMAP, "unknown Write%lu 0x%08X @ 0x%08X", sizeof(data) * 8, (u32)data, vaddr);
} }
} }