mirror of
https://github.com/ZDoom/qzdoom.git
synced 2025-01-31 04:50:48 +00:00
- fixed compilation warnings reported by GCC and Clang
src/common/filesystem/file_ssi.cpp:78:20: warning: comparison of integers of different signs: 'int' and 'uint32_t' (aka 'unsigned int') [-Wsign-compare] src/common/filesystem/file_ssi.cpp:130:38: warning: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'int' [-Wsign-compare]
This commit is contained in:
parent
1959502a0b
commit
43a3188bdf
1 changed files with 4 additions and 4 deletions
|
@ -75,7 +75,7 @@ bool FSSIFile::Open(bool quiet, int version, int lumpcount, LumpFilterInfo*)
|
|||
|
||||
|
||||
int32_t j = (version == 2 ? 267 : 254) + (lumpcount * 121);
|
||||
for (int i = 0; i < NumLumps; i+=2)
|
||||
for (uint32_t i = 0; i < NumLumps; i+=2)
|
||||
{
|
||||
char fn[13];
|
||||
int strlength = Reader.ReadUInt8();
|
||||
|
@ -121,11 +121,11 @@ FResourceFile* CheckSSI(const char* filename, FileReader& file, bool quiet, Lump
|
|||
char buf[72];
|
||||
memset(zerobuf, 0, 72);
|
||||
|
||||
auto skipstring = [&](int length)
|
||||
auto skipstring = [&](size_t length)
|
||||
{
|
||||
int strlength = file.ReadUInt8();
|
||||
size_t strlength = file.ReadUInt8();
|
||||
if (strlength > length) return false;
|
||||
int count = file.Read(buf, length);
|
||||
size_t count = file.Read(buf, length);
|
||||
buf[length] = 0;
|
||||
if (count != length || strlen(buf) != strlength) return false;
|
||||
if (length != strlength && memcmp(buf + strlength, zerobuf, length - strlength)) return false;
|
||||
|
|
Loading…
Reference in a new issue