diff options
Diffstat (limited to 'src/libs/7zip/win/CPP/7zip/Archive')
13 files changed, 19 insertions, 18 deletions
diff --git a/src/libs/7zip/win/CPP/7zip/Archive/7z/7zCompressionMode.h b/src/libs/7zip/win/CPP/7zip/Archive/7z/7zCompressionMode.h index 55bbc68ee..b3536dd0c 100644 --- a/src/libs/7zip/win/CPP/7zip/Archive/7z/7zCompressionMode.h +++ b/src/libs/7zip/win/CPP/7zip/Archive/7z/7zCompressionMode.h @@ -38,11 +38,12 @@ struct CCompressionMethodMode UString Password; bool IsEmpty() const { return (Methods.IsEmpty() && !PasswordIsDefined); } - CCompressionMethodMode(): PasswordIsDefined(false) + CCompressionMethodMode(): #ifndef _7ZIP_ST - , NumThreads(1) + NumThreads(1), #endif - {} + PasswordIsDefined(false) + {} // PQR for MinGW-w64: Initialization order. }; }} diff --git a/src/libs/7zip/win/CPP/7zip/Archive/7z/7zIn.cpp b/src/libs/7zip/win/CPP/7zip/Archive/7z/7zIn.cpp index 0feb81d2c..245cad7fa 100644 --- a/src/libs/7zip/win/CPP/7zip/Archive/7z/7zIn.cpp +++ b/src/libs/7zip/win/CPP/7zip/Archive/7z/7zIn.cpp @@ -297,7 +297,7 @@ static inline bool TestSignature2(const Byte *p) return false; if (CrcCalc(p + 12, 20) == GetUi32(p + 8)) return true; - for (i = 8; i < kHeaderSize; i++) + for (i = 8; i < (int)kHeaderSize; i++) // PQR for MinGW-w64: Signed < Unsigned comparison. if (p[i] != 0) return false; return (p[6] != 0 || p[7] != 0); @@ -1165,7 +1165,7 @@ HRESULT CInArchive::ReadDatabase2( Byte buf[kCheckSize]; RINOK(_stream->Seek(0, STREAM_SEEK_END, &cur2)); int checkSize = kCheckSize; - if (cur2 - cur < kCheckSize) + if (cur2 - cur < (unsigned int)kCheckSize) // PQR for MinGW-w64: Initialization order. checkSize = (int)(cur2 - cur); RINOK(_stream->Seek(-checkSize, STREAM_SEEK_END, &cur2)); @@ -1173,7 +1173,7 @@ HRESULT CInArchive::ReadDatabase2( int i; for (i = (int)checkSize - 2; i >= 0; i--) - if (buf[i] == 0x17 && buf[i + 1] == 0x6 || buf[i] == 0x01 && buf[i + 1] == 0x04) + if ((buf[i] == 0x17 && buf[i + 1] == 0x6) || (buf[i] == 0x01 && buf[i + 1] == 0x04)) // PQR for MinGW-w64: Priority parentheses. break; if (i < 0) return S_FALSE; diff --git a/src/libs/7zip/win/CPP/7zip/Archive/7z/7zOut.cpp b/src/libs/7zip/win/CPP/7zip/Archive/7z/7zOut.cpp index 0c8aa7e8c..82a14e0cd 100644 --- a/src/libs/7zip/win/CPP/7zip/Archive/7z/7zOut.cpp +++ b/src/libs/7zip/win/CPP/7zip/Archive/7z/7zOut.cpp @@ -279,7 +279,7 @@ void COutArchive::WriteFolder(const CFolder &folder) size_t propsSize = coder.Props.GetCapacity(); UInt64 id = coder.MethodID; - int idSize; + unsigned int idSize; // PQR for MinGW-w64: Signed < Unsigned comparison. for (idSize = 1; idSize < sizeof(id); idSize++) if ((id >> (8 * idSize)) == 0) break; diff --git a/src/libs/7zip/win/CPP/7zip/Archive/7z/7zUpdate.cpp b/src/libs/7zip/win/CPP/7zip/Archive/7z/7zUpdate.cpp index ee7f55c04..3745d0bf4 100644 --- a/src/libs/7zip/win/CPP/7zip/Archive/7z/7zUpdate.cpp +++ b/src/libs/7zip/win/CPP/7zip/Archive/7z/7zUpdate.cpp @@ -333,7 +333,7 @@ static wchar_t *g_ExeExts[] = static bool IsExeExt(const UString &ext) { - for (int i = 0; i < sizeof(g_ExeExts) / sizeof(g_ExeExts[0]); i++) + for (unsigned int i = 0; i < sizeof(g_ExeExts) / sizeof(g_ExeExts[0]); i++) // PQR for MinGW-w64: Signed < Unsigned comparison. if (ext.CompareNoCase(g_ExeExts[i]) == 0) return true; return false; diff --git a/src/libs/7zip/win/CPP/7zip/Archive/Cab/CabBlockInStream.h b/src/libs/7zip/win/CPP/7zip/Archive/Cab/CabBlockInStream.h index 1db3835b4..e621c736a 100644 --- a/src/libs/7zip/win/CPP/7zip/Archive/Cab/CabBlockInStream.h +++ b/src/libs/7zip/win/CPP/7zip/Archive/Cab/CabBlockInStream.h @@ -24,7 +24,7 @@ public: bool DataError; bool MsZip; - CCabBlockInStream(): _buffer(0), ReservedSize(0), MsZip(false), DataError(false), TotalPackSize(0) {} + CCabBlockInStream(): _buffer(0), TotalPackSize(0), ReservedSize(0), DataError(false), MsZip(false) {} // PQR for MinGW-w64: Initialization order. ~CCabBlockInStream(); bool Create(); void SetStream(ISequentialInStream *stream) { _stream = stream; } diff --git a/src/libs/7zip/win/CPP/7zip/Archive/Cab/CabHandler.cpp b/src/libs/7zip/win/CPP/7zip/Archive/Cab/CabHandler.cpp index 20f670d35..1635780c1 100644 --- a/src/libs/7zip/win/CPP/7zip/Archive/Cab/CabHandler.cpp +++ b/src/libs/7zip/win/CPP/7zip/Archive/Cab/CabHandler.cpp @@ -619,7 +619,7 @@ HRESULT CFolderOutStream::FlushCorrupted() { const UInt32 kBufferSize = (1 << 10); Byte buffer[kBufferSize]; - for (int i = 0; i < kBufferSize; i++) + for (unsigned int i = 0; i < kBufferSize; i++) // PQR for MinGW-w64: Signed < Unsigned comparison. buffer[i] = 0; for (;;) { diff --git a/src/libs/7zip/win/CPP/7zip/Archive/Common/HandlerOut.cpp b/src/libs/7zip/win/CPP/7zip/Archive/Common/HandlerOut.cpp index 70ad47aad..ed5aea150 100644 --- a/src/libs/7zip/win/CPP/7zip/Archive/Common/HandlerOut.cpp +++ b/src/libs/7zip/win/CPP/7zip/Archive/Common/HandlerOut.cpp @@ -161,7 +161,7 @@ static bool ConvertProperty(PROPVARIANT srcProp, VARTYPE varType, NCOM::CPropVar static int FindPropIdExact(const UString &name) { - for (int i = 0; i < sizeof(g_NameToPropID) / sizeof(g_NameToPropID[0]); i++) + for (unsigned int i = 0; i < sizeof(g_NameToPropID) / sizeof(g_NameToPropID[0]); i++) // PQR for MinGW-w64: Signed < Unsigned comparison. if (name.CompareNoCase(g_NameToPropID[i].Name) == 0) return i; return -1; @@ -169,7 +169,7 @@ static int FindPropIdExact(const UString &name) static int FindPropIdStart(const UString &name) { - for (int i = 0; i < sizeof(g_NameToPropID) / sizeof(g_NameToPropID[0]); i++) + for (unsigned int i = 0; i < sizeof(g_NameToPropID) / sizeof(g_NameToPropID[0]); i++) // PQR for MinGW-w64: Signed < Unsigned comparison. { UString t = g_NameToPropID[i].Name; if (t.CompareNoCase(name.Left(t.Length())) == 0) diff --git a/src/libs/7zip/win/CPP/7zip/Archive/Common/ParseProperties.cpp b/src/libs/7zip/win/CPP/7zip/Archive/Common/ParseProperties.cpp index 5cd849e29..5ce58d5ed 100644 --- a/src/libs/7zip/win/CPP/7zip/Archive/Common/ParseProperties.cpp +++ b/src/libs/7zip/win/CPP/7zip/Archive/Common/ParseProperties.cpp @@ -50,7 +50,7 @@ HRESULT ParsePropDictionaryValue(const UString &srcStringSpec, UInt32 &dicSize) return E_INVALIDARG; if (srcString.Length() == numDigits) { - if (number >= kLogarithmicSizeLimit) + if (number >= (unsigned int)kLogarithmicSizeLimit) // PQR for MinGW-w64: Signed < Unsigned comparison. return E_INVALIDARG; dicSize = (UInt32)1 << (int)number; return S_OK; diff --git a/src/libs/7zip/win/CPP/7zip/Archive/Tar/TarIn.cpp b/src/libs/7zip/win/CPP/7zip/Archive/Tar/TarIn.cpp index 5ceaa509d..58e733e17 100644 --- a/src/libs/7zip/win/CPP/7zip/Archive/Tar/TarIn.cpp +++ b/src/libs/7zip/win/CPP/7zip/Archive/Tar/TarIn.cpp @@ -82,7 +82,7 @@ static HRESULT GetNextItemReal(ISequentialInStream *stream, bool &filled, CItemE error = "There are no trailing zero-filled records"; return S_OK; } - if (processedSize != NFileHeader::kRecordSize) + if (processedSize != (unsigned int)NFileHeader::kRecordSize) // PQR for MinGW-w64: Signed < Unsigned comparison. { error = "There is no correct record at the end of archive"; return S_OK; diff --git a/src/libs/7zip/win/CPP/7zip/Archive/XzHandler.cpp b/src/libs/7zip/win/CPP/7zip/Archive/XzHandler.cpp index 64b7a5863..438d8b480 100644 --- a/src/libs/7zip/win/CPP/7zip/Archive/XzHandler.cpp +++ b/src/libs/7zip/win/CPP/7zip/Archive/XzHandler.cpp @@ -177,7 +177,7 @@ static AString GetMethodString(const CXzFilter &f) { AString s; - for (int i = 0; i < sizeof(g_NamePairs) / sizeof(g_NamePairs[i]); i++) + for (unsigned int i = 0; i < sizeof(g_NamePairs) / sizeof(g_NamePairs[i]); i++) // PQR for MinGW-w64: Signed < Unsigned comparison. if (g_NamePairs[i].Id == f.id) s = g_NamePairs[i].Name; if (s.IsEmpty()) diff --git a/src/libs/7zip/win/CPP/7zip/Archive/Zip/ZipHandler.cpp b/src/libs/7zip/win/CPP/7zip/Archive/Zip/ZipHandler.cpp index bd1563226..06ae08644 100644 --- a/src/libs/7zip/win/CPP/7zip/Archive/Zip/ZipHandler.cpp +++ b/src/libs/7zip/win/CPP/7zip/Archive/Zip/ZipHandler.cpp @@ -265,7 +265,7 @@ STDMETHODIMP CHandler::GetProperty(UInt32 index, PROPID propID, PROPVARIANT *val bool finded = false; if (item.CentralExtra.GetStrongCryptoField(f)) { - for (int i = 0; i < sizeof(g_StrongCryptoPairs) / sizeof(g_StrongCryptoPairs[0]); i++) + for (unsigned int i = 0; i < sizeof(g_StrongCryptoPairs) / sizeof(g_StrongCryptoPairs[0]); i++) // PQR for MinGW-w64: Signed < Unsigned comparison. { const CStrongCryptoPair &pair = g_StrongCryptoPairs[i]; if (f.AlgId == pair.Id) diff --git a/src/libs/7zip/win/CPP/7zip/Archive/Zip/ZipHandlerOut.cpp b/src/libs/7zip/win/CPP/7zip/Archive/Zip/ZipHandlerOut.cpp index a5e0f59d7..a8ce40962 100644 --- a/src/libs/7zip/win/CPP/7zip/Archive/Zip/ZipHandlerOut.cpp +++ b/src/libs/7zip/win/CPP/7zip/Archive/Zip/ZipHandlerOut.cpp @@ -263,7 +263,7 @@ STDMETHODIMP CHandler::UpdateItems(ISequentialOutStream *outStream, UInt32 numIt return E_INVALIDARG; if (options.IsAesMode) { - if (options.Password.Length() > NCrypto::NWzAes::kPasswordSizeMax) + if (options.Password.Length() > (int)NCrypto::NWzAes::kPasswordSizeMax) // PQR for MinGW-w64: Signed < Unsigned comparison. return E_INVALIDARG; } options.Password = UnicodeStringToMultiByte((const wchar_t *)password, CP_OEMCP); diff --git a/src/libs/7zip/win/CPP/7zip/Archive/Zip/ZipIn.cpp b/src/libs/7zip/win/CPP/7zip/Archive/Zip/ZipIn.cpp index b36b61be7..792a244be 100644 --- a/src/libs/7zip/win/CPP/7zip/Archive/Zip/ZipIn.cpp +++ b/src/libs/7zip/win/CPP/7zip/Archive/Zip/ZipIn.cpp @@ -521,7 +521,7 @@ HRESULT CInArchive::FindCd(CCdInfo &cdInfo) { if (Get32(buf + i) == NSignature::kEndOfCentralDir) { - if (i >= kZip64EcdLocatorSize) + if (i >= (int)kZip64EcdLocatorSize) // PQR for MinGW-w64: Signed < Unsigned comparison. { const Byte *locator = buf + i - kZip64EcdLocatorSize; if (Get32(locator) == NSignature::kZip64EndOfCentralDirLocator) |