Fix cast warnings

feature/pre-code-move
kaetemi 5 years ago committed by Jan Boon
parent 2c92649a72
commit aeb127e011

@ -51,18 +51,18 @@ struct CHashKey
else if (str.size() == 40)
{
HashKeyString.clear();
for(uint i = 0; i < str.size(); i+=2)
for (size_t i = 0; i < str.size(); i += 2)
{
uint8 val;
if (isdigit((unsigned char)str[i+0]))
val = str[i+0]-'0';
if (isdigit((unsigned char)str[i + 0]))
val = str[i + 0] - '0';
else
val = 10+tolower(str[i+0])-'a';
val = 10 + tolower(str[i + 0]) - 'a';
val *= 16;
if (isdigit((unsigned char)str[i+1]))
val += str[i+1]-'0';
if (isdigit((unsigned char)str[i + 1]))
val += str[i + 1] - '0';
else
val += 10+tolower(str[i+1])-'a';
val += 10 + tolower(str[i + 1]) - 'a';
HashKeyString += val;
}

@ -558,7 +558,7 @@ bool CIFile::seek (sint32 offset, IStream::TSeekOrigin origin) const
return true;
// seek in the file. NB: if not in bigfile, _BigFileOffset==0.
if (nlfseek64(_F, _BigFileOffset+_ReadPos, SEEK_SET) != 0)
if (nlfseek64(_F, (sint64)_BigFileOffset + _ReadPos, SEEK_SET) != 0)
return false;
return true;
}

Loading…
Cancel
Save