diff --git a/code/nel/include/nel/misc/sha1.h b/code/nel/include/nel/misc/sha1.h index 87edba44c..92670921b 100644 --- a/code/nel/include/nel/misc/sha1.h +++ b/code/nel/include/nel/misc/sha1.h @@ -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; } diff --git a/code/nel/src/misc/file.cpp b/code/nel/src/misc/file.cpp index 89af07129..24222bdfe 100644 --- a/code/nel/src/misc/file.cpp +++ b/code/nel/src/misc/file.cpp @@ -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; }