mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-22 12:54:13 +00:00
public: fix implicit fallthrough
This commit is contained in:
parent
cb5e282af4
commit
cb62e65f9f
@ -118,9 +118,9 @@ void CRC32_ProcessBuffer( dword *pulCRC, const void *pBuffer, int nBuffer )
|
|||||||
JustAfew:
|
JustAfew:
|
||||||
switch( nBuffer )
|
switch( nBuffer )
|
||||||
{
|
{
|
||||||
case 7: ulCrc = crc32table[*pb++ ^ (byte)ulCrc] ^ (ulCrc >> 8);
|
case 7: ulCrc = crc32table[*pb++ ^ (byte)ulCrc] ^ (ulCrc >> 8); // fallthrough
|
||||||
case 6: ulCrc = crc32table[*pb++ ^ (byte)ulCrc] ^ (ulCrc >> 8);
|
case 6: ulCrc = crc32table[*pb++ ^ (byte)ulCrc] ^ (ulCrc >> 8); // fallthrough
|
||||||
case 5: ulCrc = crc32table[*pb++ ^ (byte)ulCrc] ^ (ulCrc >> 8);
|
case 5: ulCrc = crc32table[*pb++ ^ (byte)ulCrc] ^ (ulCrc >> 8); // fallthrough
|
||||||
case 4:
|
case 4:
|
||||||
memcpy( &tmp, pb, sizeof(dword));
|
memcpy( &tmp, pb, sizeof(dword));
|
||||||
ulCrc ^= tmp; // warning, this only works on little-endian.
|
ulCrc ^= tmp; // warning, this only works on little-endian.
|
||||||
@ -130,9 +130,9 @@ JustAfew:
|
|||||||
ulCrc = crc32table[(byte)ulCrc] ^ (ulCrc >> 8);
|
ulCrc = crc32table[(byte)ulCrc] ^ (ulCrc >> 8);
|
||||||
*pulCRC = ulCrc;
|
*pulCRC = ulCrc;
|
||||||
return;
|
return;
|
||||||
case 3: ulCrc = crc32table[*pb++ ^ (byte)ulCrc] ^ (ulCrc >> 8);
|
case 3: ulCrc = crc32table[*pb++ ^ (byte)ulCrc] ^ (ulCrc >> 8); // fallthrough
|
||||||
case 2: ulCrc = crc32table[*pb++ ^ (byte)ulCrc] ^ (ulCrc >> 8);
|
case 2: ulCrc = crc32table[*pb++ ^ (byte)ulCrc] ^ (ulCrc >> 8); // fallthrough
|
||||||
case 1: ulCrc = crc32table[*pb++ ^ (byte)ulCrc] ^ (ulCrc >> 8);
|
case 1: ulCrc = crc32table[*pb++ ^ (byte)ulCrc] ^ (ulCrc >> 8); // fallthrough
|
||||||
case 0: *pulCRC = ulCrc;
|
case 0: *pulCRC = ulCrc;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -146,9 +146,9 @@ JustAfew:
|
|||||||
|
|
||||||
switch( nFront )
|
switch( nFront )
|
||||||
{
|
{
|
||||||
case 3: ulCrc = crc32table[*pb++ ^ (byte)ulCrc] ^ (ulCrc >> 8);
|
case 3: ulCrc = crc32table[*pb++ ^ (byte)ulCrc] ^ (ulCrc >> 8); // fallthrough
|
||||||
case 2: ulCrc = crc32table[*pb++ ^ (byte)ulCrc] ^ (ulCrc >> 8);
|
case 2: ulCrc = crc32table[*pb++ ^ (byte)ulCrc] ^ (ulCrc >> 8); // fallthrough
|
||||||
case 1: ulCrc = crc32table[*pb++ ^ (byte)ulCrc] ^ (ulCrc >> 8);
|
case 1: ulCrc = crc32table[*pb++ ^ (byte)ulCrc] ^ (ulCrc >> 8); // fallthrough
|
||||||
}
|
}
|
||||||
|
|
||||||
nMain = nBuffer >> 3;
|
nMain = nBuffer >> 3;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user