Skip to content

Commit

Permalink
- Fix some bad printf lines as reported by GCC.
Browse files Browse the repository at this point in the history
  • Loading branch information
mjr4077au committed Jan 5, 2024
1 parent ce03797 commit 4e0ceb9
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion source/common/console/c_enginecmds.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ CCMD (wdir)
{
if (wadnum == -1 || fileSystem.GetFileContainer(i) == wadnum)
{
Printf ("%10d %s\n", fileSystem.FileLength(i), fileSystem.GetFileFullName(i));
Printf ("%10ld %s\n", fileSystem.FileLength(i), fileSystem.GetFileFullName(i));
}
}
}
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 @@ -434,7 +434,7 @@ void FileSystem::AddFile (const char *filename, FileReader *filer, LumpFilterInf
snprintf(cksumout + (j * 2), 3, "%02X", cksum[j]);
}

fprintf(hashfile, "file: %s, lump: %s, hash: %s, size: %llu\n", filename, resfile->getName(i), cksumout, (uint64_t)resfile->Length(i));
fprintf(hashfile, "file: %s, lump: %s, hash: %s, size: %lu\n", filename, resfile->getName(i), cksumout, (uint64_t)resfile->Length(i));
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions source/common/scripting/backend/codegen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11674,7 +11674,7 @@ FxExpression *FxThreeArgForEachLoop::Resolve(FCompileContext &ctx)

if(HasGameSpecificThreeArgForEachLoopTypeNames())
{
ScriptPosition.Message(MSG_ERROR, "foreach( a, b, c : it ) - 'it' must be % but is a %s", GetGameSpecificThreeArgForEachLoopTypeNames(), BlockIteratorExpr->ValueType->DescriptiveName());
ScriptPosition.Message(MSG_ERROR, "foreach( a, b, c : it ) - 'it' must be %s but is a %s", GetGameSpecificThreeArgForEachLoopTypeNames(), BlockIteratorExpr->ValueType->DescriptiveName());
delete this;
return nullptr;
}
Expand Down Expand Up @@ -11727,7 +11727,7 @@ FxExpression *FxTypedForEachLoop::Resolve(FCompileContext &ctx)

if(HasGameSpecificTypedForEachLoopTypeNames())
{
ScriptPosition.Message(MSG_ERROR, "foreach(Type var : it ) - 'it' must be % but is a %s",GetGameSpecificTypedForEachLoopTypeNames(), Expr->ValueType->DescriptiveName());
ScriptPosition.Message(MSG_ERROR, "foreach(Type var : it ) - 'it' must be %s but is a %s",GetGameSpecificTypedForEachLoopTypeNames(), Expr->ValueType->DescriptiveName());
delete this;
return nullptr;
}
Expand Down
2 changes: 1 addition & 1 deletion source/core/initfs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ void InitFileSystem(TArray<GrpEntry>& groups)
for (int num = 0; num < fileSystem.GetNumEntries(); num++)
{
int64_t fd = fileSystem.FileLength(num);
fprintf(f, "%.50s %60s %lld\n", fileSystem.GetFileFullName(num), fileSystem.GetResourceFileFullName(fileSystem.GetFileContainer(num)), fd);
fprintf(f, "%.50s %60s %ld\n", fileSystem.GetFileFullName(num), fileSystem.GetResourceFileFullName(fileSystem.GetFileContainer(num)), fd);
}
fclose(f);
}
Expand Down

0 comments on commit 4e0ceb9

Please sign in to comment.