mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 14:49:42 -06:00
Fix format string warnings
This commit is contained in:
@ -9,6 +9,8 @@
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include <cinttypes>
|
||||
|
||||
#include "CompressedBlob.h"
|
||||
#include "DiscScrubber.h"
|
||||
#include "FileUtil.h"
|
||||
@ -99,7 +101,7 @@ void CompressedBlobReader::GetBlock(u64 block_num, u8 *out_ptr)
|
||||
// First, check hash.
|
||||
u32 block_hash = HashAdler32(source, comp_block_size);
|
||||
if (block_hash != hashes[block_num])
|
||||
PanicAlert("Hash of block %lli is %08x instead of %08x.\n"
|
||||
PanicAlert("Hash of block %" PRIu64 " is %08x instead of %08x.\n"
|
||||
"Your ISO, %s, is corrupt.",
|
||||
block_num, block_hash, hashes[block_num],
|
||||
file_name.c_str());
|
||||
@ -127,7 +129,7 @@ void CompressedBlobReader::GetBlock(u64 block_num, u8 *out_ptr)
|
||||
{
|
||||
// this seem to fire wrongly from time to time
|
||||
// to be sure, don't use compressed isos :P
|
||||
PanicAlert("Failure reading block %lli - out of data and not at end.", block_num);
|
||||
PanicAlert("Failure reading block %" PRIu64 " - out of data and not at end.", block_num);
|
||||
}
|
||||
inflateEnd(&z);
|
||||
if (uncomp_size != header.block_size)
|
||||
|
@ -7,6 +7,8 @@
|
||||
#include "FileUtil.h"
|
||||
#include "DiscScrubber.h"
|
||||
|
||||
#include <cinttypes>
|
||||
|
||||
namespace DiscIO
|
||||
{
|
||||
|
||||
@ -121,13 +123,13 @@ void GetNextBlock(File::IOFile& in, u8* buffer)
|
||||
|
||||
if (m_isScrubbing && m_FreeTable[i])
|
||||
{
|
||||
DEBUG_LOG(DISCIO, "Freeing 0x%016llx", CurrentOffset);
|
||||
DEBUG_LOG(DISCIO, "Freeing 0x%016" PRIx64, CurrentOffset);
|
||||
std::fill(buffer, buffer + m_BlockSize, 0xFF);
|
||||
in.Seek(m_BlockSize, SEEK_CUR);
|
||||
}
|
||||
else
|
||||
{
|
||||
DEBUG_LOG(DISCIO, "Used 0x%016llx", CurrentOffset);
|
||||
DEBUG_LOG(DISCIO, "Used 0x%016" PRIx64, CurrentOffset);
|
||||
in.ReadBytes(buffer, m_BlockSize);
|
||||
}
|
||||
|
||||
@ -150,7 +152,7 @@ void MarkAsUsed(u64 _Offset, u64 _Size)
|
||||
u64 CurrentOffset = _Offset;
|
||||
u64 EndOffset = CurrentOffset + _Size;
|
||||
|
||||
DEBUG_LOG(DISCIO, "Marking 0x%016llx - 0x%016llx as used", _Offset, EndOffset);
|
||||
DEBUG_LOG(DISCIO, "Marking 0x%016" PRIx64 " - 0x%016" PRIx64 " as used", _Offset, EndOffset);
|
||||
|
||||
while ((CurrentOffset < EndOffset) && (CurrentOffset < m_FileSize))
|
||||
{
|
||||
|
@ -8,6 +8,7 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
#include <cinttypes>
|
||||
|
||||
#include "FileSystemGCWii.h"
|
||||
#include "StringUtil.h"
|
||||
@ -70,7 +71,7 @@ u64 CFileSystemGCWii::ReadFile(const char* _rFullPath, u8* _pBuffer, size_t _Max
|
||||
if (pFileInfo->m_FileSize > _MaxBufferSize)
|
||||
return 0;
|
||||
|
||||
DEBUG_LOG(DISCIO, "Filename: %s. Offset: %llx. Size: %llx",_rFullPath,
|
||||
DEBUG_LOG(DISCIO, "Filename: %s. Offset: %" PRIx64 ". Size: %" PRIx64, _rFullPath,
|
||||
pFileInfo->m_Offset, pFileInfo->m_FileSize);
|
||||
|
||||
m_rVolume->Read(pFileInfo->m_Offset, pFileInfo->m_FileSize, _pBuffer);
|
||||
|
Reference in New Issue
Block a user