Fixed all VS2015 warnings except C4577 ('noexcept' used with no exception handling mode specified)
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6627 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
b54c831ff0
commit
1c1d1d5e12
12 changed files with 124 additions and 31 deletions
|
@ -36,8 +36,8 @@ void InitCRC() {
|
|||
int i, j; unsigned long c;
|
||||
for (c = i = 0; i < 256; c = ++i) {
|
||||
for (j = 0; j < 8; j++) {
|
||||
if (c & 1) c = (c>>1) ^ 0xEDB88320;
|
||||
else c >>= 1;
|
||||
if (c & 1) c = (c>>1) ^ 0xEDB88320;
|
||||
else c >>= 1;
|
||||
}
|
||||
CRCTable[i] = c;
|
||||
}
|
||||
|
@ -56,7 +56,7 @@ crc32_t streamCRC32(bistream& data) {
|
|||
crc32_t crc = 0xFFFFFFFF;
|
||||
while(data.good()) {
|
||||
data.read(reinterpret_cast<char*>(block), CRCBLOCKSIZE);
|
||||
read = data.gcount();
|
||||
read = (unsigned int) data.gcount(); // The cast is safe because we never read more than CRCBLOCKSIZE
|
||||
for (p = block; p < block + read; p++)
|
||||
crc = CRCTable[(crc & 0xFF) ^ *p] ^ (crc >> 8);
|
||||
}
|
||||
|
@ -77,7 +77,7 @@ void streamMD5(bistream& data, md5_byte_t digest[16]) {
|
|||
|
||||
while(data.good()) {
|
||||
data.read(reinterpret_cast<char*>(md5block), MD5BLOCKSIZE);
|
||||
read = data.gcount();
|
||||
read = (unsigned int) data.gcount(); // The cast is safe because we never read more than MD5BLOCKSIZE
|
||||
md5_append(&state, md5block, read);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue