use proper printf format specifiers for size_t and ptrdiff_t.

This commit is contained in:
Christoph Oelckers 2024-01-06 14:37:57 +01:00
parent 406cb04952
commit a496332136
3 changed files with 3 additions and 3 deletions

View file

@ -321,7 +321,7 @@ void FStringTable::LoadLanguage (int lumpnum, const char* buffer, size_t size)
}
else
{
sc.ScriptError ("The language code must be 2 or 3 characters long.\n'%s' is %lu characters long.",
sc.ScriptError ("The language code must be 2 or 3 characters long.\n'%s' is %zu characters long.",
sc.String, len);
}
}

View file

@ -1273,7 +1273,7 @@ void FileSystem::ReadFile (int lump, void *dest)
if (numread != size)
{
throw FileSystemException("W_ReadFile: only read %ld of %ld on '%s'\n",
throw FileSystemException("W_ReadFile: only read %td of %td on '%s'\n",
numread, size, FileInfo[lump].LongName);
}
}

View file

@ -377,7 +377,7 @@ void SaveCRCs(TArray<FileEntry>& crclist)
{
for (auto& crc : crclist)
{
FStringf line("\"%s\" %llu %llu %u\n", crc.FileName.GetChars(), (long long)crc.FileLength, (long long)crc.FileTime, crc.CRCValue);
FStringf line("\"%s\" %zu %zu %u\n", crc.FileName.GetChars(), crc.FileLength, crc.FileTime, crc.CRCValue);
fw->Write(line.GetChars(), line.Len());
}
delete fw;