format strings: use format macros where the type is ambiguous

This commit is contained in:
Paul "Dettorer" Hervot 2016-03-31 22:30:47 -07:00
parent 6f684dc2b3
commit c8d37ee27a
3 changed files with 16 additions and 12 deletions

View File

@ -2,6 +2,7 @@
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.
#include <cinttypes>
#include <cstddef>
#include <system_error>
#include <type_traits>
@ -105,7 +106,7 @@ ResultVal<bool> File::SyncRequest() {
GetTypeName().c_str(), GetName().c_str(), offset, length, address);
if (offset + length > backend->GetSize()) {
LOG_ERROR(Service_FS, "Reading from out of bounds offset=0x%llX length=0x%08X file_size=0x%llX",
LOG_ERROR(Service_FS, "Reading from out of bounds offset=0x%" PRIX64 " length=0x%08X file_size=0x%" PRIX64,
offset, length, backend->GetSize());
}

View File

@ -2,6 +2,8 @@
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.
#include <cinttypes>
#include "common/assert.h"
#include "common/common_types.h"
#include "common/file_util.h"
@ -250,7 +252,7 @@ static void CreateFile(Service::Interface* self) {
FileSys::Path file_path(filename_type, filename_size, filename_ptr);
LOG_DEBUG(Service_FS, "type=%d size=%llu data=%s", filename_type, filename_size, file_path.DebugStr().c_str());
LOG_DEBUG(Service_FS, "type=%d size=%" PRIu32 " data=%s", filename_type, filename_size, file_path.DebugStr().c_str());
cmd_buff[1] = CreateFileInArchive(archive_handle, file_path, file_size).raw;
}

View File

@ -3,6 +3,7 @@
// Refer to the license.txt file included.
#include <algorithm>
#include <cinttypes>
#include <cstring>
#include <memory>
@ -256,7 +257,7 @@ ResultStatus AppLoader_NCCH::Load() {
resource_limit_category = exheader_header.arm11_system_local_caps.resource_limit_category;
LOG_INFO(Loader, "Name: %s" , exheader_header.codeset_info.name);
LOG_INFO(Loader, "Program ID: %016X" , ncch_header.program_id);
LOG_INFO(Loader, "Program ID: %016" PRIX64 , ncch_header.program_id);
LOG_DEBUG(Loader, "Code compressed: %s" , is_compressed ? "yes" : "no");
LOG_DEBUG(Loader, "Entry point: 0x%08X" , entry_point);
LOG_DEBUG(Loader, "Code size: 0x%08X" , code_size);