Fix for mixed comparison of signed and unsigned expressions [Werror=sign-compare]
A free file archiver for extremely high compression
Brought to you by:
ipavlov
A cosmetic change to CPP/7zip/Archive/Wim/WimIn.cpp on line 680 is needed:
@@ -677,7 +677,7 @@ HRESULT CDatabase::ParseDirItem(size_t pos, int parent)
const UInt64 len2 = Get64(p2);
- if ((len2 & align) != 0 || rem2 < len2 || len2 < (IsOldVersion ? 0x18 : 0x28))
+ if ((len2 & align) != 0 || rem2 < len2 || len2 < (UInt64)(IsOldVersion ? 0x18 : 0x28))^M
return S_FALSE;
to fix compiler warning (treated as error) about comparing an unsigned variable len2
to a signed numeric literal.
Ok.
Last edit: Igor Pavlov 2022-10-14