summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkh1 <karsten.heimrich@nokia.com>2012-08-21 12:05:11 +0200
committerTim Jenssen <tim.jenssen@nokia.com>2012-08-24 14:27:53 +0200
commit3e5c51e1f7b99eda252e06968520d212eb5f5fe4 (patch)
treea04e2034316e024f0648a657369772c7f46bb0a8
parentf9814b28ce934541f16d12d54534bea543143c01 (diff)
Revert "Fixes required for errorless MinGW-w64 compilation are done."wip/componentview
This reverts commit 9cad5d54cf0d78e92b4ee831299d83b657f42f2e as it breaks compressing the meta folder (Windows 7, VS 2010). Change-Id: I24d4ec37941487fc3cc998706d33cd5d8b9f011a Reviewed-by: Tim Jenssen <tim.jenssen@nokia.com>
-rw-r--r--installerfw.pri13
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/7z/7zCompressionMode.h7
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/7z/7zIn.cpp6
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/7z/7zOut.cpp2
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/7z/7zUpdate.cpp2
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Cab/CabBlockInStream.h2
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Cab/CabHandler.cpp2
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Common/HandlerOut.cpp4
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Common/ParseProperties.cpp2
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Tar/TarIn.cpp2
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/XzHandler.cpp2
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Zip/ZipHandler.cpp2
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Zip/ZipHandlerOut.cpp2
-rw-r--r--src/libs/7zip/win/CPP/7zip/Archive/Zip/ZipIn.cpp2
-rw-r--r--src/libs/7zip/win/CPP/7zip/Common/FileStreams.h1
-rw-r--r--src/libs/7zip/win/CPP/7zip/Common/StreamObjects.cpp4
-rw-r--r--src/libs/7zip/win/CPP/7zip/Compress/BZip2Decoder.cpp6
-rw-r--r--src/libs/7zip/win/CPP/7zip/Compress/BZip2Decoder.h4
-rw-r--r--src/libs/7zip/win/CPP/7zip/Compress/BZip2Encoder.cpp6
-rw-r--r--src/libs/7zip/win/CPP/7zip/Compress/BZip2Encoder.h2
-rw-r--r--src/libs/7zip/win/CPP/7zip/Compress/CopyCoder.h2
-rw-r--r--src/libs/7zip/win/CPP/7zip/Compress/DeflateConst.h2
-rw-r--r--src/libs/7zip/win/CPP/7zip/Compress/DeflateDecoder.cpp8
-rw-r--r--src/libs/7zip/win/CPP/7zip/Compress/DeflateEncoder.cpp2
-rw-r--r--src/libs/7zip/win/CPP/7zip/UI/Common/ArchiveCommandLine.cpp6
-rw-r--r--src/libs/7zip/win/CPP/7zip/UI/Common/ArchiveExtractCallback.cpp2
-rw-r--r--src/libs/7zip/win/CPP/7zip/UI/Common/Bench.cpp2
-rw-r--r--src/libs/7zip/win/CPP/7zip/UI/Common/EnumDirItems.cpp2
-rw-r--r--src/libs/7zip/win/CPP/7zip/UI/Common/ExtractingFilePath.cpp2
-rw-r--r--src/libs/7zip/win/CPP/7zip/UI/Common/OpenArchive.cpp2
-rw-r--r--src/libs/7zip/win/CPP/7zip/UI/Common/Update.h6
-rw-r--r--src/libs/7zip/win/CPP/7zip/UI/Console/List.cpp2
-rw-r--r--src/libs/7zip/win/CPP/7zip/UI/Console/UpdateCallbackConsole.h12
-rw-r--r--src/libs/7zip/win/CPP/Common/DynamicBuffer.h2
-rw-r--r--src/libs/7zip/win/CPP/Common/MyCom.h1
-rw-r--r--src/libs/7zip/win/CPP/Common/Wildcard.cpp3
-rw-r--r--src/libs/7zip/win/CPP/Common/Wildcard.h4
-rw-r--r--src/libs/7zip/win/CPP/Windows/FileIO.cpp4
-rw-r--r--src/libs/7zip/win/CPP/Windows/Registry.cpp28
-rw-r--r--src/libs/installer/environmentvariablesoperation.cpp6
-rw-r--r--src/libs/installer/fsengineserver.cpp3
-rw-r--r--src/libs/installer/installer.pro5
-rw-r--r--src/libs/installer/link.cpp4
-rw-r--r--src/libs/kdtools/kdsavefile.cpp11
-rw-r--r--src/libs/kdtools/kdtools.pri2
-rw-r--r--src/libs/kdtools/kdupdaterupdateoperations.cpp25
-rw-r--r--src/sdk/sdk.pro2
47 files changed, 98 insertions, 125 deletions
diff --git a/installerfw.pri b/installerfw.pri
index ba5fe9aa2..86618d6d3 100644
--- a/installerfw.pri
+++ b/installerfw.pri
@@ -45,6 +45,12 @@ INCLUDEPATH += \
win32:INCLUDEPATH += $$IFW_SOURCE_TREE/src/libs/7zip/win/CPP
unix:INCLUDEPATH += $$IFW_SOURCE_TREE/src/libs/7zip/unix/CPP
+LIBS += -L$$IFW_LIB_PATH
+# The order is important. The linker needs to parse archives in reversed dependency order.
+equals(TEMPLATE, app):LIBS += -linstaller
+unix:!macx:LIBS += -lutil
+macx:LIBS += -framework Carbon -framework Security
+
CONFIG += help uitools
CONFIG(static, static|shared) {
QTPLUGIN += qsqlite
@@ -62,10 +68,3 @@ static {
win32:exists($$IFW_LIB_PATH/installer.lib):POST_TARGETDEPS += $$IFW_LIB_PATH/installer.lib
unix:exists($$IFW_LIB_PATH/libinstaller.a):POST_TARGETDEPS += $$IFW_LIB_PATH/libinstaller.a
}
-
-LIBS += -L$$IFW_LIB_PATH
-# The order is important for a static compilation. The linker needs to parse libs/objects in dependency order.
-equals(TEMPLATE, app):LIBS += -linstaller
-unix:!macx:LIBS += -lutil
-macx:LIBS += -framework Carbon -framework Security
-win32:LIBS *= -lmpr # PQR for MinGW-w64: Added -lmpr for WNetGetUniversalName.
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 b3536dd0c..55bbc68ee 100644
--- a/src/libs/7zip/win/CPP/7zip/Archive/7z/7zCompressionMode.h
+++ b/src/libs/7zip/win/CPP/7zip/Archive/7z/7zCompressionMode.h
@@ -38,12 +38,11 @@ struct CCompressionMethodMode
UString Password;
bool IsEmpty() const { return (Methods.IsEmpty() && !PasswordIsDefined); }
- CCompressionMethodMode():
+ CCompressionMethodMode(): PasswordIsDefined(false)
#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 245cad7fa..0feb81d2c 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 < (int)kHeaderSize; i++) // PQR for MinGW-w64: Signed < Unsigned comparison.
+ for (i = 8; i < kHeaderSize; i++)
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 < (unsigned int)kCheckSize) // PQR for MinGW-w64: Initialization order.
+ if (cur2 - cur < kCheckSize)
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)) // PQR for MinGW-w64: Priority parentheses.
+ if (buf[i] == 0x17 && buf[i + 1] == 0x6 || buf[i] == 0x01 && buf[i + 1] == 0x04)
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 82a14e0cd..0c8aa7e8c 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;
- unsigned int idSize; // PQR for MinGW-w64: Signed < Unsigned comparison.
+ int idSize;
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 3745d0bf4..ee7f55c04 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 (unsigned int i = 0; i < sizeof(g_ExeExts) / sizeof(g_ExeExts[0]); i++) // PQR for MinGW-w64: Signed < Unsigned comparison.
+ for (int i = 0; i < sizeof(g_ExeExts) / sizeof(g_ExeExts[0]); i++)
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 e621c736a..1db3835b4 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), TotalPackSize(0), ReservedSize(0), DataError(false), MsZip(false) {} // PQR for MinGW-w64: Initialization order.
+ CCabBlockInStream(): _buffer(0), ReservedSize(0), MsZip(false), DataError(false), TotalPackSize(0) {}
~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 1635780c1..20f670d35 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 (unsigned int i = 0; i < kBufferSize; i++) // PQR for MinGW-w64: Signed < Unsigned comparison.
+ for (int i = 0; i < kBufferSize; i++)
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 ed5aea150..70ad47aad 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 (unsigned int i = 0; i < sizeof(g_NameToPropID) / sizeof(g_NameToPropID[0]); i++) // PQR for MinGW-w64: Signed < Unsigned comparison.
+ for (int i = 0; i < sizeof(g_NameToPropID) / sizeof(g_NameToPropID[0]); i++)
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 (unsigned int i = 0; i < sizeof(g_NameToPropID) / sizeof(g_NameToPropID[0]); i++) // PQR for MinGW-w64: Signed < Unsigned comparison.
+ for (int i = 0; i < sizeof(g_NameToPropID) / sizeof(g_NameToPropID[0]); i++)
{
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 5ce58d5ed..5cd849e29 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 >= (unsigned int)kLogarithmicSizeLimit) // PQR for MinGW-w64: Signed < Unsigned comparison.
+ if (number >= kLogarithmicSizeLimit)
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 58e733e17..5ceaa509d 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 != (unsigned int)NFileHeader::kRecordSize) // PQR for MinGW-w64: Signed < Unsigned comparison.
+ if (processedSize != NFileHeader::kRecordSize)
{
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 438d8b480..64b7a5863 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 (unsigned int i = 0; i < sizeof(g_NamePairs) / sizeof(g_NamePairs[i]); i++) // PQR for MinGW-w64: Signed < Unsigned comparison.
+ for (int i = 0; i < sizeof(g_NamePairs) / sizeof(g_NamePairs[i]); i++)
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 06ae08644..bd1563226 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 (unsigned int i = 0; i < sizeof(g_StrongCryptoPairs) / sizeof(g_StrongCryptoPairs[0]); i++) // PQR for MinGW-w64: Signed < Unsigned comparison.
+ for (int i = 0; i < sizeof(g_StrongCryptoPairs) / sizeof(g_StrongCryptoPairs[0]); i++)
{
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 a8ce40962..a5e0f59d7 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() > (int)NCrypto::NWzAes::kPasswordSizeMax) // PQR for MinGW-w64: Signed < Unsigned comparison.
+ if (options.Password.Length() > NCrypto::NWzAes::kPasswordSizeMax)
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 792a244be..b36b61be7 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 >= (int)kZip64EcdLocatorSize) // PQR for MinGW-w64: Signed < Unsigned comparison.
+ if (i >= kZip64EcdLocatorSize)
{
const Byte *locator = buf + i - kZip64EcdLocatorSize;
if (Get32(locator) == NSignature::kZip64EndOfCentralDirLocator)
diff --git a/src/libs/7zip/win/CPP/7zip/Common/FileStreams.h b/src/libs/7zip/win/CPP/7zip/Common/FileStreams.h
index 573d3130c..895745d36 100644
--- a/src/libs/7zip/win/CPP/7zip/Common/FileStreams.h
+++ b/src/libs/7zip/win/CPP/7zip/Common/FileStreams.h
@@ -14,6 +14,7 @@
#endif
#include "../../Common/MyCom.h"
+
#include "../IStream.h"
class CInFileStream:
diff --git a/src/libs/7zip/win/CPP/7zip/Common/StreamObjects.cpp b/src/libs/7zip/win/CPP/7zip/Common/StreamObjects.cpp
index bb2df1797..3c86c3aeb 100644
--- a/src/libs/7zip/win/CPP/7zip/Common/StreamObjects.cpp
+++ b/src/libs/7zip/win/CPP/7zip/Common/StreamObjects.cpp
@@ -78,7 +78,7 @@ Byte *CDynBufSeqOutStream::GetBufPtrForWriting(size_t addSize)
void CDynBufSeqOutStream::CopyToBuffer(CByteBuffer &dest) const
{
dest.SetCapacity(_size);
- memcpy(dest, &_buffer, _size); // PQR for MinGW-w64: requires _buffer address here.
+ memcpy(dest, _buffer, _size);
}
STDMETHODIMP CDynBufSeqOutStream::Write(const void *data, UInt32 size, UInt32 *processedSize)
@@ -205,7 +205,7 @@ STDMETHODIMP CCachedInStream::Read(void *data, UInt32 size, UInt32 *processedSiz
return S_OK;
}
-
+
STDMETHODIMP CCachedInStream::Seek(Int64 offset, UInt32 seekOrigin, UInt64 *newPosition)
{
switch(seekOrigin)
diff --git a/src/libs/7zip/win/CPP/7zip/Compress/BZip2Decoder.cpp b/src/libs/7zip/win/CPP/7zip/Compress/BZip2Decoder.cpp
index 7c641d7f7..cb1f981a7 100644
--- a/src/libs/7zip/win/CPP/7zip/Compress/BZip2Decoder.cpp
+++ b/src/libs/7zip/win/CPP/7zip/Compress/BZip2Decoder.cpp
@@ -291,7 +291,7 @@ static UInt32 NO_INLINE DecodeBlock2(const UInt32 *tt, UInt32 blockSize, UInt32
unsigned b = (unsigned)(tPos & 0xFF);
tPos = tt[tPos >> 8];
- if (numReps == (unsigned int)kRleModeRepSize) // PQR for MinGW-w64: Signed < Unsigned comparison.
+ if (numReps == kRleModeRepSize)
{
for (; b > 0; b--)
{
@@ -395,7 +395,7 @@ static UInt32 NO_INLINE DecodeBlock2Rand(const UInt32 *tt, UInt32 blockSize, UIn
randToGo--;
}
- if (numReps == (unsigned int)kRleModeRepSize) // PQR for MinGW-w64: Signed < Unsigned comparison.
+ if (numReps == kRleModeRepSize)
{
for (; b > 0; b--)
{
@@ -904,7 +904,7 @@ STDMETHODIMP CNsisDecoder::Read(void *data, UInt32 size, UInt32 *processedSize)
tPos = tt[tPos >> 8];
blockSize--;
- if (numReps == (unsigned int)kRleModeRepSize) // PQR for MinGW-w64: Signed < Unsigned comparison.
+ if (numReps == kRleModeRepSize)
{
numReps = 0;
while (b)
diff --git a/src/libs/7zip/win/CPP/7zip/Compress/BZip2Decoder.h b/src/libs/7zip/win/CPP/7zip/Compress/BZip2Decoder.h
index decf41dc3..e6dec1eaa 100644
--- a/src/libs/7zip/win/CPP/7zip/Compress/BZip2Decoder.h
+++ b/src/libs/7zip/win/CPP/7zip/Compress/BZip2Decoder.h
@@ -91,8 +91,8 @@ private:
bool ReleaseInStream;
CDecoderFlusher(CDecoder *decoder, bool releaseInStream):
_decoder(decoder),
- NeedFlush(true),
- ReleaseInStream(releaseInStream) {} // PQR for MinGW-w64: Initialization order.
+ ReleaseInStream(releaseInStream),
+ NeedFlush(true) {}
~CDecoderFlusher()
{
if (NeedFlush)
diff --git a/src/libs/7zip/win/CPP/7zip/Compress/BZip2Encoder.cpp b/src/libs/7zip/win/CPP/7zip/Compress/BZip2Encoder.cpp
index 37e719977..eaa108558 100644
--- a/src/libs/7zip/win/CPP/7zip/Compress/BZip2Encoder.cpp
+++ b/src/libs/7zip/win/CPP/7zip/Compress/BZip2Encoder.cpp
@@ -846,7 +846,7 @@ HRESULT CEncoder::SetCoderProperties(const PROPID *propIDs, const PROPVARIANT *p
UInt32 numPasses = prop.ulVal;
if (numPasses == 0)
numPasses = 1;
- if (numPasses > (unsigned int)kNumPassesMax) // PQR for MinGW-w64: Signed < Unsigned comparison.
+ if (numPasses > kNumPassesMax)
numPasses = kNumPassesMax;
NumPasses = numPasses;
m_OptimizeNumTables = (NumPasses > 1);
@@ -857,9 +857,9 @@ HRESULT CEncoder::SetCoderProperties(const PROPID *propIDs, const PROPVARIANT *p
if (prop.vt != VT_UI4)
return E_INVALIDARG;
UInt32 dictionary = prop.ulVal / kBlockSizeStep;
- if (dictionary < (unsigned int)kBlockSizeMultMin) // PQR for MinGW-w64: Signed < Unsigned comparison.
+ if (dictionary < kBlockSizeMultMin)
dictionary = kBlockSizeMultMin;
- else if (dictionary > (unsigned int)kBlockSizeMultMax) // PQR for MinGW-w64: Signed < Unsigned comparison.
+ else if (dictionary > kBlockSizeMultMax)
dictionary = kBlockSizeMultMax;
m_BlockSizeMult = dictionary;
break;
diff --git a/src/libs/7zip/win/CPP/7zip/Compress/BZip2Encoder.h b/src/libs/7zip/win/CPP/7zip/Compress/BZip2Encoder.h
index e864fb398..a863172fe 100644
--- a/src/libs/7zip/win/CPP/7zip/Compress/BZip2Encoder.h
+++ b/src/libs/7zip/win/CPP/7zip/Compress/BZip2Encoder.h
@@ -137,7 +137,7 @@ public:
DWORD ThreadFunc();
#endif
- CThreadInfo(): m_Block(0), m_BlockSorterIndex(0) {} // PQR for MinGW-w64: Initialization order.
+ CThreadInfo(): m_BlockSorterIndex(0), m_Block(0) {}
~CThreadInfo() { Free(); }
bool Alloc();
void Free();
diff --git a/src/libs/7zip/win/CPP/7zip/Compress/CopyCoder.h b/src/libs/7zip/win/CPP/7zip/Compress/CopyCoder.h
index daef658d9..c5445ccf8 100644
--- a/src/libs/7zip/win/CPP/7zip/Compress/CopyCoder.h
+++ b/src/libs/7zip/win/CPP/7zip/Compress/CopyCoder.h
@@ -17,7 +17,7 @@ class CCopyCoder:
Byte *_buffer;
public:
UInt64 TotalSize;
- CCopyCoder(): _buffer(0), TotalSize(0) {} // PQR for MinGW-w64: Initialization order.
+ CCopyCoder(): TotalSize(0), _buffer(0) {};
~CCopyCoder();
MY_UNKNOWN_IMP1(ICompressGetInStreamProcessedSize)
diff --git a/src/libs/7zip/win/CPP/7zip/Compress/DeflateConst.h b/src/libs/7zip/win/CPP/7zip/Compress/DeflateConst.h
index 1e0817fa7..00e5ab8bf 100644
--- a/src/libs/7zip/win/CPP/7zip/Compress/DeflateConst.h
+++ b/src/libs/7zip/win/CPP/7zip/Compress/DeflateConst.h
@@ -114,7 +114,7 @@ struct CLevels
void SetFixedLevels()
{
- unsigned int i; // PQR for MinGW-w64: Signed < Unsigned comparison.
+ int i;
for (i = 0; i < 144; i++)
litLenLevels[i] = 8;
diff --git a/src/libs/7zip/win/CPP/7zip/Compress/DeflateDecoder.cpp b/src/libs/7zip/win/CPP/7zip/Compress/DeflateDecoder.cpp
index 28ae304b0..2848cd812 100644
--- a/src/libs/7zip/win/CPP/7zip/Compress/DeflateDecoder.cpp
+++ b/src/libs/7zip/win/CPP/7zip/Compress/DeflateDecoder.cpp
@@ -12,11 +12,11 @@ static const int kLenIdFinished = -1;
static const int kLenIdNeedInit = -2;
CCoder::CCoder(bool deflate64Mode, bool deflateNSIS):
- _deflateNSIS(deflateNSIS),
_deflate64Mode(deflate64Mode),
+ _deflateNSIS(deflateNSIS),
_keepHistory(false),
_needInitInStream(true),
- ZlibMode(false) {} // PQR for MinGW-w64: Initialization order.
+ ZlibMode(false) {}
UInt32 CCoder::ReadBits(int numBits)
{
@@ -90,14 +90,14 @@ bool CCoder::ReadTables(void)
{
int numLitLenLevels = ReadBits(kNumLenCodesFieldSize) + kNumLitLenCodesMin;
_numDistLevels = ReadBits(kNumDistCodesFieldSize) + kNumDistCodesMin;
- unsigned int numLevelCodes = ReadBits(kNumLevelCodesFieldSize) + kNumLevelCodesMin;
+ int numLevelCodes = ReadBits(kNumLevelCodesFieldSize) + kNumLevelCodesMin;
if (!_deflate64Mode)
if (_numDistLevels > kDistTableSize32)
return false;
Byte levelLevels[kLevelTableSize];
- for (unsigned int i = 0; i < kLevelTableSize; i++) // PQR for MinGW-w64: Signed < Unsigned comparison.
+ for (int i = 0; i < kLevelTableSize; i++)
{
int position = kCodeLengthAlphabetOrder[i];
if(i < numLevelCodes)
diff --git a/src/libs/7zip/win/CPP/7zip/Compress/DeflateEncoder.cpp b/src/libs/7zip/win/CPP/7zip/Compress/DeflateEncoder.cpp
index 4ce104f91..35a81cae4 100644
--- a/src/libs/7zip/win/CPP/7zip/Compress/DeflateEncoder.cpp
+++ b/src/libs/7zip/win/CPP/7zip/Compress/DeflateEncoder.cpp
@@ -49,7 +49,7 @@ class CFastPosInit
public:
CFastPosInit()
{
- unsigned int i; // PQR for MinGW-w64: Signed < Unsigned comparison.
+ int i;
for(i = 0; i < kNumLenSlots; i++)
{
int c = kLenStart32[i];
diff --git a/src/libs/7zip/win/CPP/7zip/UI/Common/ArchiveCommandLine.cpp b/src/libs/7zip/win/CPP/7zip/UI/Common/ArchiveCommandLine.cpp
index 3750f5b24..8ae2e15e8 100644
--- a/src/libs/7zip/win/CPP/7zip/UI/Common/ArchiveCommandLine.cpp
+++ b/src/libs/7zip/win/CPP/7zip/UI/Common/ArchiveCommandLine.cpp
@@ -275,8 +275,6 @@ static void AddNameToCensor(NWildcard::CCensor &wildcardCensor,
case NRecursedType::kRecursed:
recursed = true;
break;
- default: // PQR for MinGW-w64: To avoid compiler warnings on unhandled cases.
- break;
}
wildcardCensor.AddItem(include, name, recursed);
}
@@ -744,8 +742,8 @@ static int FindCharset(const NCommandLineParser::CParser &parser, int keyIndex,
UString name = parser[keyIndex].PostStrings.Back();
name.MakeUpper();
- unsigned int i;
- for (i = 0; i < sizeof(g_CodePagePairs) / sizeof(g_CodePagePairs[0]); i++) // PQR for MinGW-w64: Signed < Unsigned.
+ int i;
+ for (i = 0; i < sizeof(g_CodePagePairs) / sizeof(g_CodePagePairs[0]); i++)
{
const CCodePagePair &pair = g_CodePagePairs[i];
if (name.Compare(pair.Name) == 0)
diff --git a/src/libs/7zip/win/CPP/7zip/UI/Common/ArchiveExtractCallback.cpp b/src/libs/7zip/win/CPP/7zip/UI/Common/ArchiveExtractCallback.cpp
index 54ad11945..4c0cc90b5 100644
--- a/src/libs/7zip/win/CPP/7zip/UI/Common/ArchiveExtractCallback.cpp
+++ b/src/libs/7zip/win/CPP/7zip/UI/Common/ArchiveExtractCallback.cpp
@@ -316,8 +316,6 @@ STDMETHODIMP CArchiveExtractCallback::GetStream(UInt32 index, ISequentialOutStre
return E_FAIL;
}
}
- default: // PQR for MinGW-w64: To avoid compiler warnings about unhandled cases.
- break;
}
if (_overwriteMode == NExtract::NOverwriteMode::kAutoRename)
{
diff --git a/src/libs/7zip/win/CPP/7zip/UI/Common/Bench.cpp b/src/libs/7zip/win/CPP/7zip/UI/Common/Bench.cpp
index 163851c3a..282f405f1 100644
--- a/src/libs/7zip/win/CPP/7zip/UI/Common/Bench.cpp
+++ b/src/libs/7zip/win/CPP/7zip/UI/Common/Bench.cpp
@@ -907,7 +907,7 @@ struct CCrcThreads
{
UInt32 NumThreads;
CCrcInfo *Items;
- CCrcThreads(): NumThreads(0), Items(0) {} // PQR for MinGW-w64: Initialization order.
+ CCrcThreads(): Items(0), NumThreads(0) {}
void WaitAll()
{
for (UInt32 i = 0; i < NumThreads; i++)
diff --git a/src/libs/7zip/win/CPP/7zip/UI/Common/EnumDirItems.cpp b/src/libs/7zip/win/CPP/7zip/UI/Common/EnumDirItems.cpp
index 71073f2b7..ba03ea35c 100644
--- a/src/libs/7zip/win/CPP/7zip/UI/Common/EnumDirItems.cpp
+++ b/src/libs/7zip/win/CPP/7zip/UI/Common/EnumDirItems.cpp
@@ -219,7 +219,7 @@ static HRESULT EnumerateDirItems(const NWildcard::CCensorNode &curNode,
continue;
}
bool isDir = fi.IsDir();
- if ((isDir && !item.ForDir) || (!isDir && !item.ForFile)) // PQR for MinGW-w64: Priority parentheses.
+ if (isDir && !item.ForDir || !isDir && !item.ForFile)
{
errorCodes.Add((DWORD)E_FAIL);
errorPaths.Add(fullPath);
diff --git a/src/libs/7zip/win/CPP/7zip/UI/Common/ExtractingFilePath.cpp b/src/libs/7zip/win/CPP/7zip/UI/Common/ExtractingFilePath.cpp
index 91749497f..8f31708b6 100644
--- a/src/libs/7zip/win/CPP/7zip/UI/Common/ExtractingFilePath.cpp
+++ b/src/libs/7zip/win/CPP/7zip/UI/Common/ExtractingFilePath.cpp
@@ -59,7 +59,7 @@ static bool CheckNameNum(const UString &name, const wchar_t *reservedName)
static bool IsSupportedName(const UString &name)
{
- for (unsigned int i = 0; i < sizeof(g_ReservedNames) / sizeof(g_ReservedNames[0]); i++) // PQR for MinGW-w64: Signed < Unsigned comparison.
+ for (int i = 0; i < sizeof(g_ReservedNames) / sizeof(g_ReservedNames[0]); i++)
{
const wchar_t *reservedName = g_ReservedNames[i];
int len = MyStringLen(reservedName);
diff --git a/src/libs/7zip/win/CPP/7zip/UI/Common/OpenArchive.cpp b/src/libs/7zip/win/CPP/7zip/UI/Common/OpenArchive.cpp
index ab45bd027..56a630467 100644
--- a/src/libs/7zip/win/CPP/7zip/UI/Common/OpenArchive.cpp
+++ b/src/libs/7zip/win/CPP/7zip/UI/Common/OpenArchive.cpp
@@ -167,7 +167,7 @@ HRESULT CArc::OpenStream(
{
const CArcInfoEx &ai = codecs->Formats[orderIndices[i]];
const CByteBuffer &sig = ai.StartSignature;
- if (sig.GetCapacity() < (unsigned int)kNumHashBytes) // PQR for MinGW-w64: Signed < Unsigned comparison.
+ if (sig.GetCapacity() < kNumHashBytes)
continue;
UInt32 v = HASH_VAL(sig, 0);
prevs[i] = hash[v];
diff --git a/src/libs/7zip/win/CPP/7zip/UI/Common/Update.h b/src/libs/7zip/win/CPP/7zip/UI/Common/Update.h
index 15cc5010c..49af0092a 100644
--- a/src/libs/7zip/win/CPP/7zip/UI/Common/Update.h
+++ b/src/libs/7zip/win/CPP/7zip/UI/Common/Update.h
@@ -116,12 +116,12 @@ struct CUpdateOptions
CUpdateOptions():
UpdateArchiveItself(true),
SfxMode(false),
- OpenShareForWrite(false),
StdInMode(false),
StdOutMode(false),
EMailMode(false),
- EMailRemoveAfter(false)
- {} // PQR for MinGW-w64: Initialization order.
+ EMailRemoveAfter(false),
+ OpenShareForWrite(false)
+ {};
void SetAddActionCommand()
{
diff --git a/src/libs/7zip/win/CPP/7zip/UI/Console/List.cpp b/src/libs/7zip/win/CPP/7zip/UI/Console/List.cpp
index 8e7d3f295..f747cfda8 100644
--- a/src/libs/7zip/win/CPP/7zip/UI/Console/List.cpp
+++ b/src/libs/7zip/win/CPP/7zip/UI/Console/List.cpp
@@ -202,7 +202,7 @@ void CFieldPrinter::Init(const CFieldInfoInit *standardFieldTable, int numItems)
static UString GetPropName(PROPID propID, BSTR name)
{
- for (unsigned int i = 0; i < sizeof(kPropIdToName) / sizeof(kPropIdToName[0]); i++) // PQR for MinGW-w64: Signed < Unsigned.
+ for (int i = 0; i < sizeof(kPropIdToName) / sizeof(kPropIdToName[0]); i++)
{
const CPropIdToName &propIdToName = kPropIdToName[i];
if (propIdToName.PropID == propID)
diff --git a/src/libs/7zip/win/CPP/7zip/UI/Console/UpdateCallbackConsole.h b/src/libs/7zip/win/CPP/7zip/UI/Console/UpdateCallbackConsole.h
index b4cbf793e..5ffe3eb7a 100644
--- a/src/libs/7zip/win/CPP/7zip/UI/Console/UpdateCallbackConsole.h
+++ b/src/libs/7zip/win/CPP/7zip/UI/Console/UpdateCallbackConsole.h
@@ -30,14 +30,14 @@ public:
CUpdateCallbackConsole():
m_PercentPrinter(1 << 16),
- m_WarningsMode(false),
- EnablePercents(true),
- StdOutMode(false)
#ifndef _NO_CRYPTO
- ,PasswordIsDefined(false),
- AskPassword(false)
+ PasswordIsDefined(false),
+ AskPassword(false),
#endif
- {} // PQR for MinGW-w64: Initialization order.
+ StdOutMode(false),
+ EnablePercents(true),
+ m_WarningsMode(false)
+ {}
~CUpdateCallbackConsole() { Finilize(); }
void Init(CStdOutStream *outStream)
diff --git a/src/libs/7zip/win/CPP/Common/DynamicBuffer.h b/src/libs/7zip/win/CPP/Common/DynamicBuffer.h
index 8bf54e726..bf52a7425 100644
--- a/src/libs/7zip/win/CPP/Common/DynamicBuffer.h
+++ b/src/libs/7zip/win/CPP/Common/DynamicBuffer.h
@@ -20,7 +20,7 @@ template <class T> class CDynamicBuffer: public CBuffer<T>
size_t newCap = this->_capacity + delta;
if (newCap < delta)
newCap = this->_capacity + size;
- CBuffer<T>::SetCapacity(newCap); // PQR for MinGW-w64: template specification required.
+ SetCapacity(newCap);
}
public:
CDynamicBuffer(): CBuffer<T>() {};
diff --git a/src/libs/7zip/win/CPP/Common/MyCom.h b/src/libs/7zip/win/CPP/Common/MyCom.h
index 308a35d18..2f00c258f 100644
--- a/src/libs/7zip/win/CPP/Common/MyCom.h
+++ b/src/libs/7zip/win/CPP/Common/MyCom.h
@@ -4,7 +4,6 @@
#define __MYCOM_H
#include "MyWindows.h"
-#include "unknwn.h" // PQR for MinGW-w64: To allow IID_IUnknown to be defined.
#ifndef RINOK
#define RINOK(x) { HRESULT __result_ = (x); if (__result_ != S_OK) return __result_; }
diff --git a/src/libs/7zip/win/CPP/Common/Wildcard.cpp b/src/libs/7zip/win/CPP/Common/Wildcard.cpp
index bc4f97bd7..476ddebde 100644
--- a/src/libs/7zip/win/CPP/Common/Wildcard.cpp
+++ b/src/libs/7zip/win/CPP/Common/Wildcard.cpp
@@ -402,12 +402,11 @@ void CCensor::AddItem(bool include, const UString &path, bool recursive)
}
}
int numAbsParts = 0;
- if (isAbs) { // PQR for MinGW-w64: Explicit braces needed.
+ if (isAbs)
if (pathParts.Size() > 1)
numAbsParts = pathParts.Size() - 1;
else
numAbsParts = 1;
- }
UString prefix;
for (int i = 0; i < numAbsParts; i++)
{
diff --git a/src/libs/7zip/win/CPP/Common/Wildcard.h b/src/libs/7zip/win/CPP/Common/Wildcard.h
index 859f567ea..6d4cbcece 100644
--- a/src/libs/7zip/win/CPP/Common/Wildcard.h
+++ b/src/libs/7zip/win/CPP/Common/Wildcard.h
@@ -32,8 +32,8 @@ class CCensorNode
void AddItemSimple(bool include, CItem &item);
bool CheckPath(UStringVector &pathParts, bool isFile, bool &include) const;
public:
- CCensorNode(): Parent(0) { }
- CCensorNode(const UString &name, CCensorNode *parent): Parent(parent), Name(name) { } // PQR for MinGW-w64: Initialization order.
+ CCensorNode(): Parent(0) { };
+ CCensorNode(const UString &name, CCensorNode *parent): Name(name), Parent(parent) { };
UString Name;
CObjectVector<CCensorNode> SubNodes;
CObjectVector<CItem> IncludeItems;
diff --git a/src/libs/7zip/win/CPP/Windows/FileIO.cpp b/src/libs/7zip/win/CPP/Windows/FileIO.cpp
index c848a710c..938e6c701 100644
--- a/src/libs/7zip/win/CPP/Windows/FileIO.cpp
+++ b/src/libs/7zip/win/CPP/Windows/FileIO.cpp
@@ -71,12 +71,12 @@ bool GetLongPathBase(LPCWSTR s, UString &res)
res.Empty();
int len = MyStringLen(s);
wchar_t c = s[0];
- if (len < 1 || c == L'\\' || (c == L'.' && (len == 1 || (len == 2 && s[1] == L'.')))) // PQR for MinGW-w64: Priority parentheses.
+ if (len < 1 || c == L'\\' || c == L'.' && (len == 1 || len == 2 && s[1] == L'.'))
return true;
UString curDir;
bool isAbs = false;
if (len > 3)
- isAbs = (s[1] == L':' && s[2] == L'\\' && ((c >= L'a' && c <= L'z') || (c >= L'A' && c <= L'Z'))); // PQR for MinGW-w64: Priority parentheses.
+ isAbs = (s[1] == L':' && s[2] == L'\\' && (c >= L'a' && c <= L'z' || c >= L'A' && c <= L'Z'));
if (!isAbs)
{
diff --git a/src/libs/7zip/win/CPP/Windows/Registry.cpp b/src/libs/7zip/win/CPP/Windows/Registry.cpp
index c6db9266f..8b25375d9 100644
--- a/src/libs/7zip/win/CPP/Windows/Registry.cpp
+++ b/src/libs/7zip/win/CPP/Windows/Registry.cpp
@@ -116,8 +116,7 @@ LONG CKey::DeleteValue(LPCWSTR name)
LONG CKey::SetValue(LPCTSTR name, UInt32 value)
{
MYASSERT(_object != NULL);
- // PQR for MinGW-w64: Parameter #3 was NULL instead of 0.
- return RegSetValueEx(_object, name, 0, REG_DWORD,
+ return RegSetValueEx(_object, name, NULL, REG_DWORD,
(BYTE * const)&value, sizeof(UInt32));
}
@@ -130,8 +129,7 @@ LONG CKey::SetValue(LPCTSTR name, LPCTSTR value)
{
MYASSERT(value != NULL);
MYASSERT(_object != NULL);
- // PQR for MinGW-w64: Parameter #3 was NULL instead of 0.
- return RegSetValueEx(_object, name, 0, REG_SZ,
+ return RegSetValueEx(_object, name, NULL, REG_SZ,
(const BYTE * )value, (lstrlen(value) + 1) * sizeof(TCHAR));
}
@@ -165,8 +163,7 @@ LONG CKey::SetValue(LPCTSTR name, const void *value, UInt32 size)
{
MYASSERT(value != NULL);
MYASSERT(_object != NULL);
- // PQR for MinGW-w64: Parameter #3 was NULL instead of 0.
- return RegSetValueEx(_object, name, 0, REG_BINARY,
+ return RegSetValueEx(_object, name, NULL, REG_BINARY,
(const BYTE *)value, size);
}
@@ -192,10 +189,9 @@ LONG CKey::SetKeyValue(LPCTSTR keyName, LPCTSTR valueName, LPCTSTR value)
LONG CKey::QueryValue(LPCTSTR name, UInt32 &value)
{
- DWORD type = 0; // PQR for MinGW-w64: Changed NULL to 0 to avoid warning.
+ DWORD type = NULL;
DWORD count = sizeof(DWORD);
- // PQR for MinGW-w64: Parameter #3 was NULL instead of 0.
- LONG res = RegQueryValueEx(_object, (LPTSTR)name, 0, &type,
+ LONG res = RegQueryValueEx(_object, (LPTSTR)name, NULL, &type,
(LPBYTE)&value, &count);
MYASSERT((res!=ERROR_SUCCESS) || (type == REG_DWORD));
MYASSERT((res!=ERROR_SUCCESS) || (count == sizeof(UInt32)));
@@ -231,9 +227,8 @@ LONG CKey::GetValue_IfOk(LPCTSTR name, bool &value)
LONG CKey::QueryValue(LPCTSTR name, LPTSTR value, UInt32 &count)
{
MYASSERT(count != NULL);
- DWORD type = 0; // PQR for MinGW-w64: Changed NULL to 0 to avoid warning.
- // PQR for MinGW-w64: Parameter #3 was NULL instead of 0.
- LONG res = RegQueryValueEx(_object, (LPTSTR)name, 0, &type, (LPBYTE)value, (DWORD *)&count);
+ DWORD type = NULL;
+ LONG res = RegQueryValueEx(_object, (LPTSTR)name, NULL, &type, (LPBYTE)value, (DWORD *)&count);
MYASSERT((res!=ERROR_SUCCESS) || (type == REG_SZ) || (type == REG_MULTI_SZ) || (type == REG_EXPAND_SZ));
return res;
}
@@ -241,9 +236,8 @@ LONG CKey::QueryValue(LPCTSTR name, LPTSTR value, UInt32 &count)
LONG CKey::QueryValue(LPCTSTR name, CSysString &value)
{
value.Empty();
- DWORD type = 0; // PQR for MinGW-w64: Changed NULL to 0 to avoid warning.
+ DWORD type = NULL;
UInt32 currentSize = 0;
- // PQR for MinGW-w64: Parameter #3 was NULL instead of 0.
LONG res = RegQueryValueEx(_object, (LPTSTR)name, NULL, &type, NULL, (DWORD *)&currentSize);
if (res != ERROR_SUCCESS && res != ERROR_MORE_DATA)
return res;
@@ -288,8 +282,7 @@ LONG CKey::QueryValue(LPCWSTR name, UString &value)
LONG CKey::QueryValue(LPCTSTR name, void *value, UInt32 &count)
{
- DWORD type = 0; // PQR for MinGW-w64: Changed NULL to 0 to avoid warning.
- // PQR for MinGW-w64: Parameter #3 was NULL instead of 0.
+ DWORD type = NULL;
LONG res = RegQueryValueEx(_object, (LPTSTR)name, NULL, &type, (LPBYTE)value, (DWORD *)&count);
MYASSERT((res!=ERROR_SUCCESS) || (type == REG_BINARY));
return res;
@@ -298,9 +291,8 @@ LONG CKey::QueryValue(LPCTSTR name, void *value, UInt32 &count)
LONG CKey::QueryValue(LPCTSTR name, CByteBuffer &value, UInt32 &dataSize)
{
- DWORD type = 0; // PQR for MinGW-w64: Changed NULL to 0 to avoid warning.
+ DWORD type = NULL;
dataSize = 0;
- // PQR for MinGW-w64: Parameter #3 was NULL instead of 0.
LONG res = RegQueryValueEx(_object, (LPTSTR)name, NULL, &type, NULL, (DWORD *)&dataSize);
if (res != ERROR_SUCCESS && res != ERROR_MORE_DATA)
return res;
diff --git a/src/libs/installer/environmentvariablesoperation.cpp b/src/libs/installer/environmentvariablesoperation.cpp
index 98915b5c6..68693d455 100644
--- a/src/libs/installer/environmentvariablesoperation.cpp
+++ b/src/libs/installer/environmentvariablesoperation.cpp
@@ -62,15 +62,9 @@ static bool broadcastChange() {
// Use SendMessageTimeout to Broadcast a message to the whole system to update settings of all
// running applications. This is needed to activate the changes done above without logout+login.
// Note that cmd.exe does not respond to any WM_SETTINGCHANGE messages...
-#ifdef __MINGW64__
- PDWORD_PTR aResult = 0;
- LRESULT sendresult = SendMessageTimeout(HWND_BROADCAST, WM_SETTINGCHANGE,
- 0, (LPARAM) "Environment", SMTO_BLOCK | SMTO_ABORTIFHUNG, 5000, aResult);
-#else
DWORD aResult = 0;
LRESULT sendresult = SendMessageTimeout(HWND_BROADCAST, WM_SETTINGCHANGE,
0, (LPARAM) "Environment", SMTO_BLOCK | SMTO_ABORTIFHUNG, 5000, &aResult);
-#endif
if (sendresult == 0 || aResult != 0) {
qWarning("Failed to broadcast a WM_SETTINGCHANGE message\n");
return false;
diff --git a/src/libs/installer/fsengineserver.cpp b/src/libs/installer/fsengineserver.cpp
index 9bcc4a920..2b2556c3d 100644
--- a/src/libs/installer/fsengineserver.cpp
+++ b/src/libs/installer/fsengineserver.cpp
@@ -60,8 +60,7 @@ bool startDetached(const QString &program, const QStringList &args, const QStrin
};
const QString arguments = QInstaller::createCommandline(program, args);
- // PQR for MinGW-w64: Parameter #2 was const_cast<wchar_t *>(static_cast<const wchar_t *>(arguments.utf16())).
- const bool success = CreateProcess(0, (LPWSTR)arguments.utf16(),
+ const bool success = CreateProcess(0, const_cast<wchar_t *>(static_cast<const wchar_t *>(arguments.utf16())),
0, 0, FALSE, CREATE_UNICODE_ENVIRONMENT | CREATE_NEW_CONSOLE,
0, (wchar_t*)workingDirectory.utf16(),
&startupInfo, &pinfo);
diff --git a/src/libs/installer/installer.pro b/src/libs/installer/installer.pro
index 5a74e5772..f21394ae2 100644
--- a/src/libs/installer/installer.pro
+++ b/src/libs/installer/installer.pro
@@ -178,9 +178,8 @@ unix:!macx:SOURCES += adminauthorization_x11.cpp
win32 {
SOURCES += adminauthorization_win.cpp
- LIBS += -loleaut32 -lUser32 # 7zip
- LIBS += -ladvapi32 -lpsapi # kdtools - PQR for MinGW-w64: Changed to standard link flags.
- LIBS += -lmpr -luuid # PQR for MinGW-w64: libMPR is for WNetGetUniversalName, libUUID is for IID_IUnknown and friends.
+ LIBS += -loleaut32 -lUser32 # 7zip
+ LIBS += advapi32.lib psapi.lib # kdtools
LIBS += -lole32 # createshortcutoperation
CONFIG(shared, static|shared):LIBS += -lshell32
}
diff --git a/src/libs/installer/link.cpp b/src/libs/installer/link.cpp
index 08214232f..31f6270f4 100644
--- a/src/libs/installer/link.cpp
+++ b/src/libs/installer/link.cpp
@@ -81,7 +81,7 @@ public:
: m_dirHandle(INVALID_HANDLE_VALUE)
{
QString normalizedPath = QString(path).replace(QLatin1Char('/'), QLatin1Char('\\'));
- m_dirHandle = CreateFile(normalizedPath.toStdWString().c_str(), GENERIC_READ | GENERIC_WRITE, 0, 0,
+ m_dirHandle = CreateFile(normalizedPath.utf16(), GENERIC_READ | GENERIC_WRITE, 0, 0,
OPEN_EXISTING, FILE_FLAG_OPEN_REPARSE_POINT | FILE_FLAG_BACKUP_SEMANTICS, 0);
if (m_dirHandle == INVALID_HANDLE_VALUE) {
@@ -149,7 +149,7 @@ Link createJunction(const QString &linkPath, const QString &targetPath)
QString normalizedTargetPath = QString(targetPath).replace(QLatin1Char('/'), QLatin1Char('\\'));
//now we add the real absolute path
- StringCchCat(szDestDir, 1024, normalizedTargetPath.toStdWString().c_str());
+ StringCchCat(szDestDir, 1024, normalizedTargetPath.utf16());
// Allocates a block of memory for an array of num elements(1) and initializes all its bits to zero.
_REPARSE_DATA_BUFFER* reparseStructData = (_REPARSE_DATA_BUFFER*)calloc(1,
diff --git a/src/libs/kdtools/kdsavefile.cpp b/src/libs/kdtools/kdsavefile.cpp
index 5a81ad424..94ed1aa36 100644
--- a/src/libs/kdtools/kdsavefile.cpp
+++ b/src/libs/kdtools/kdsavefile.cpp
@@ -28,8 +28,7 @@
#include <QtCore/QTemporaryFile>
#ifdef Q_OS_WIN
- #include <io.h>
- #include <share.h> // PQR for MinGW-w64: Required for _SH_DENYRW
+# include <io.h>
#endif
#include <memory>
#include <sys/stat.h>
@@ -93,11 +92,9 @@ static QString makeAbsolute(const QString &path)
static int myOpen(const QString &path, int flags, int mode)
{
#ifdef Q_OS_WIN
- // PQR for MinGW-w64: _wsopen_s doesn't exist in MSVCRT.dll, let's use _wsopen.
- return _wsopen(reinterpret_cast<const wchar_t *>(path.utf16()), flags, _SH_DENYRW, mode);
- //int fd;
- //_wsopen_s(&fd, reinterpret_cast<const wchar_t *>(path.utf16()), flags, _SH_DENYRW, mode);
- //return fd;
+ int fd;
+ _wsopen_s(&fd, reinterpret_cast<const wchar_t *>(path.utf16()), flags, _SH_DENYRW, mode);
+ return fd;
#else
return open(QFile::encodeName(path).constData(), flags, mode);
#endif
diff --git a/src/libs/kdtools/kdtools.pri b/src/libs/kdtools/kdtools.pri
index 6023fdee8..a83243502 100644
--- a/src/libs/kdtools/kdtools.pri
+++ b/src/libs/kdtools/kdtools.pri
@@ -17,7 +17,7 @@ HEADERS += $$PWD/kdtoolsglobal.h \
$$PWD/kdsysinfo.h
SOURCES += $$PWD/kdjob.cpp \
-# $$PWD/kdgenericfactory.cpp \ # this has no content
+ $$PWD/kdgenericfactory.cpp \
$$PWD/kdselfrestarter.cpp \
$$PWD/kdsavefile.cpp \
$$PWD/kdrunoncechecker.cpp \
diff --git a/src/libs/kdtools/kdupdaterupdateoperations.cpp b/src/libs/kdtools/kdupdaterupdateoperations.cpp
index fa8f3ce0d..6f934abe8 100644
--- a/src/libs/kdtools/kdupdaterupdateoperations.cpp
+++ b/src/libs/kdtools/kdupdaterupdateoperations.cpp
@@ -104,8 +104,8 @@ void CopyOperation::backup()
setValue(QLatin1String("backupOfExistingDestination"), backupFileName(dest));
- // race condition: The backup file could get created
- // by another process right now. But this is the same
+ // race condition: The backup file could get created
+ // by another process right now. But this is the same
// in QFile::copy...
const bool success = QFile::rename(dest, value(QLatin1String("backupOfExistingDestination")).toString());
if (!success)
@@ -179,9 +179,9 @@ QDomDocument CopyOperation::toXml() const
// we don't want to save the backupOfExistingDestination
if (!hasValue(QLatin1String("backupOfExistingDestination")))
return UpdateOperation::toXml();
-
+
CopyOperation *const me = const_cast<CopyOperation *>(this);
-
+
const QVariant v = value(QLatin1String("backupOfExistingDestination"));
me->clearValue(QLatin1String("backupOfExistingDestination"));
const QDomDocument xml = UpdateOperation::toXml();
@@ -225,8 +225,8 @@ void MoveOperation::backup()
setValue(QLatin1String("backupOfExistingDestination"), backupFileName(dest));
- // race condition: The backup file could get created
- // by another process right now. But this is the same
+ // race condition: The backup file could get created
+ // by another process right now. But this is the same
// in QFile::copy...
const bool success = QFile::rename(dest, value(QLatin1String("backupOfExistingDestination")).toString());
if (!success)
@@ -389,9 +389,9 @@ QDomDocument DeleteOperation::toXml() const
// we don't want to save the backupOfExistingFile
if (!hasValue(QLatin1String("backupOfExistingFile")))
return UpdateOperation::toXml();
-
+
DeleteOperation *const me = const_cast<DeleteOperation *>(this);
-
+
const QVariant v = value(QLatin1String("backupOfExistingFile"));
me->clearValue(QLatin1String("backupOfExistingFile"));
const QDomDocument xml = UpdateOperation::toXml();
@@ -847,7 +847,7 @@ bool ExecuteOperation::performOperation()
}
QList<int> allowedExitCodes;
-
+
QRegExp re(QLatin1String("^\\{((-?\\d+,)*-?\\d+)\\}$"));
if (re.exactMatch(args.first())) {
const QStringList numbers = re.cap(1).split(QLatin1Char(','));
@@ -865,7 +865,7 @@ bool ExecuteOperation::performOperation()
args.pop_back();
#ifdef Q_OS_WIN
QString arguments = qt_create_commandline(args.front(), args.mid(1));
-
+
PROCESS_INFORMATION pinfo;
STARTUPINFOW startupInfo = { sizeof(STARTUPINFO), 0, 0, 0,
@@ -873,8 +873,7 @@ bool ExecuteOperation::performOperation()
static_cast< ulong >(CW_USEDEFAULT), static_cast< ulong >(CW_USEDEFAULT),
0, 0, 0, STARTF_USESHOWWINDOW, SW_HIDE, 0, 0, 0, 0, 0
};
- // PQR for MinGW-w64: Parameter #2 was const_cast< wchar_t* >(static_cast< const wchar_t* >(arguments.utf16())).
- success = CreateProcess(0, (LPWSTR)arguments.utf16(),
+ success = CreateProcess(0, const_cast< wchar_t* >(static_cast< const wchar_t* >(arguments.utf16())),
0, 0, FALSE, CREATE_UNICODE_ENVIRONMENT | CREATE_NEW_CONSOLE, 0,
0,
&startupInfo, &pinfo);
@@ -888,7 +887,7 @@ bool ExecuteOperation::performOperation()
{
Environment::instance().applyTo(&process); //apply non-persistent variables
process.start(args.front(), args.mid(1));
-
+
QEventLoop loop;
QObject::connect(&process, SIGNAL(finished(int, QProcess::ExitStatus)), &loop, SLOT(quit()));
QObject::connect(&process, SIGNAL(readyRead()), this, SLOT(readProcessOutput()));
diff --git a/src/sdk/sdk.pro b/src/sdk/sdk.pro
index 72a0dc1ec..3cf5b6c64 100644
--- a/src/sdk/sdk.pro
+++ b/src/sdk/sdk.pro
@@ -1,6 +1,6 @@
TEMPLATE = app
DEPENDPATH += . ..
-INCLUDEPATH += . ..
+INCLUDEPATH += . ..
TARGET = installerbase
include(../../installerfw.pri)