Skip to content

Commit

Permalink
use proper printf format specifiers for size_t and ptrdiff_t.
Browse files Browse the repository at this point in the history
  • Loading branch information
coelckers committed Jan 6, 2024
1 parent 406cb04 commit a496332
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion source/common/engine/stringtable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down
2 changes: 1 addition & 1 deletion source/common/filesystem/source/filesystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down
2 changes: 1 addition & 1 deletion source/core/searchpaths.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit a496332

Please sign in to comment.