Add Fast LZMA2 codec dll build; Fix 32-bit warnings

This commit is contained in:
conor42
2018-11-07 14:34:04 +10:00
parent ab10047253
commit 296c91d212
16 changed files with 111 additions and 18 deletions

View File

@@ -352,7 +352,7 @@ static size_t RMF_bitpackExtendMatch(const BYTE* const data,
ptrdiff_t dist = start_index - link;
if (limit > start_index + (ptrdiff_t)kMatchLenMax)
limit = start_index + kMatchLenMax;
while (end_index < limit && end_index - (table[end_index] & RADIX_LINK_MASK) == dist) {
while (end_index < limit && end_index - (ptrdiff_t)(table[end_index] & RADIX_LINK_MASK) == dist) {
end_index += table[end_index] >> RADIX_LINK_BITS;
}
if (end_index >= limit) {
@@ -381,7 +381,7 @@ static size_t RMF_structuredExtendMatch(const BYTE* const data,
ptrdiff_t dist = start_index - link;
if (limit > start_index + (ptrdiff_t)kMatchLenMax)
limit = start_index + kMatchLenMax;
while (end_index < limit && end_index - GetMatchLink(table, end_index) == dist) {
while (end_index < limit && end_index - (ptrdiff_t)GetMatchLink(table, end_index) == dist) {
end_index += GetMatchLength(table, end_index);
}
if (end_index >= limit) {

View File

@@ -1028,7 +1028,7 @@ static size_t ExtendMatch(const FL2_matchTable* const tbl,
{
ptrdiff_t end_index = start_index + length;
ptrdiff_t const dist = start_index - link;
while (end_index < limit && end_index - GetMatchLink(end_index) == dist) {
while (end_index < limit && end_index - (ptrdiff_t)GetMatchLink(end_index) == dist) {
end_index += GetMatchLength(end_index);
}
if (end_index >= limit) {