core: Fix clang build

Recent changes to the build system that made more warnings be flagged as
errors caused building via clang to break.

Fixes #4795
This commit is contained in:
Lioncash 2020-10-15 14:49:45 -04:00
parent 72df55f8a5
commit 18636013c9
105 changed files with 906 additions and 667 deletions

View file

@ -36,14 +36,14 @@ bool DecompressBLZ(std::vector<u8>& data) {
while (out_index > 0) {
--index;
auto control = data[index + start_offset];
for (size_t i = 0; i < 8; ++i) {
for (std::size_t i = 0; i < 8; ++i) {
if (((control << i) & 0x80) > 0) {
if (index < 2) {
return false;
}
index -= 2;
std::size_t segment_offset =
data[index + start_offset] | data[index + start_offset + 1] << 8;
std::size_t segment_offset = static_cast<u32>(data[index + start_offset]) |
static_cast<u32>(data[index + start_offset + 1] << 8);
std::size_t segment_size = ((segment_offset >> 12) & 0xF) + 3;
segment_offset &= 0xFFF;
segment_offset += 3;