summaryrefslogtreecommitdiffstats
path: root/src/libs/7zip/unix
diff options
context:
space:
mode:
authorTim Jenssen <tim.jenssen@digia.com>2012-10-30 12:25:15 +0100
committerKarsten Heimrich <karsten.heimrich@digia.com>2012-10-31 12:24:59 +0100
commit90ecea22156bd5e2b8c360b6a13cc7f4d98d705d (patch)
treeddf61ef9400ecb3514c022abb2bdc9e6473e8d1d /src/libs/7zip/unix
parentdf3f9838f58b8bca182539eb392ba128e0c511c0 (diff)
reduce warnings on old gcc versions (Mac used 4.2.1)
Change-Id: Icf60411ea67900b98fec91570b8799d65751f9ee Reviewed-by: Niels Weber <niels.weber@digia.com> Reviewed-by: Karsten Heimrich <karsten.heimrich@digia.com>
Diffstat (limited to 'src/libs/7zip/unix')
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/7z/7zIn.cpp2
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Common/FindSignature.cpp2
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Tar/TarIn.cpp2
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Archive/Zip/ZipHandlerOut.cpp2
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/BZip2Encoder.cpp2
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/DeflateEncoder.cpp2
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/HuffmanDecoder.h2
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/Mtf8.h2
-rw-r--r--src/libs/7zip/unix/CPP/7zip/Compress/QuantumDecoder.h2
-rw-r--r--src/libs/7zip/unix/CPP/7zip/UI/Common/OpenArchive.cpp2
-rw-r--r--src/libs/7zip/unix/CPP/Common/MyString.cpp8
-rw-r--r--src/libs/7zip/unix/CPP/Common/MyString.h4
-rw-r--r--src/libs/7zip/unix/CPP/Common/MyWindows.cpp2
-rw-r--r--src/libs/7zip/unix/CPP/Windows/FileIO.cpp2
14 files changed, 18 insertions, 18 deletions
diff --git a/src/libs/7zip/unix/CPP/7zip/Archive/7z/7zIn.cpp b/src/libs/7zip/unix/CPP/7zip/Archive/7z/7zIn.cpp
index 0feb81d2c..b11819616 100644
--- a/src/libs/7zip/unix/CPP/7zip/Archive/7z/7zIn.cpp
+++ b/src/libs/7zip/unix/CPP/7zip/Archive/7z/7zIn.cpp
@@ -338,7 +338,7 @@ HRESULT CInArchive::FindAndReadSignature(IInStream *stream, const UInt64 *search
UInt32 numTests = numPrevBytes - kHeaderSize;
for (UInt32 pos = 0; pos < numTests; pos++)
{
- for (; buffer[pos] != '7' && pos < numTests; pos++);
+ for (; buffer[pos] != '7' && pos < numTests; pos++) {}
if (pos == numTests)
break;
if (TestSignature(buffer + pos))
diff --git a/src/libs/7zip/unix/CPP/7zip/Archive/Common/FindSignature.cpp b/src/libs/7zip/unix/CPP/7zip/Archive/Common/FindSignature.cpp
index 15aa6ceae..dc4e33980 100644
--- a/src/libs/7zip/unix/CPP/7zip/Archive/Common/FindSignature.cpp
+++ b/src/libs/7zip/unix/CPP/7zip/Archive/Common/FindSignature.cpp
@@ -46,7 +46,7 @@ HRESULT FindSignatureInStream(ISequentialInStream *stream,
for (UInt32 pos = 0; pos < numTests; pos++)
{
Byte b = signature[0];
- for (; buffer[pos] != b && pos < numTests; pos++);
+ for (; buffer[pos] != b && pos < numTests; pos++) {}
if (pos == numTests)
break;
if (memcmp(buffer + pos, signature, signatureSize) == 0)
diff --git a/src/libs/7zip/unix/CPP/7zip/Archive/Tar/TarIn.cpp b/src/libs/7zip/unix/CPP/7zip/Archive/Tar/TarIn.cpp
index 5ceaa509d..311ac1786 100644
--- a/src/libs/7zip/unix/CPP/7zip/Archive/Tar/TarIn.cpp
+++ b/src/libs/7zip/unix/CPP/7zip/Archive/Tar/TarIn.cpp
@@ -31,7 +31,7 @@ static bool OctalToNumber(const char *srcString, int size, UInt64 &res)
sz[size] = 0;
const char *end;
int i;
- for (i = 0; sz[i] == ' '; i++);
+ for (i = 0; sz[i] == ' '; i++) {}
res = ConvertOctStringToUInt64(sz + i, &end);
return (*end == ' ' || *end == 0);
}
diff --git a/src/libs/7zip/unix/CPP/7zip/Archive/Zip/ZipHandlerOut.cpp b/src/libs/7zip/unix/CPP/7zip/Archive/Zip/ZipHandlerOut.cpp
index ee1c07fae..428e4349a 100644
--- a/src/libs/7zip/unix/CPP/7zip/Archive/Zip/ZipHandlerOut.cpp
+++ b/src/libs/7zip/unix/CPP/7zip/Archive/Zip/ZipHandlerOut.cpp
@@ -206,7 +206,7 @@ STDMETHODIMP CHandler::UpdateItems(ISequentialOutStream *outStream, UInt32 numIt
if (tryUtf8)
{
int i;
- for (i = 0; i < name.Length() && (unsigned)name[i] < 0x80; i++);
+ for (i = 0; i < name.Length() && (unsigned)name[i] < 0x80; i++) {}
ui.IsUtf8 = (i != name.Length());
if (!ConvertUnicodeToUTF8(name, ui.Name))
return E_INVALIDARG;
diff --git a/src/libs/7zip/unix/CPP/7zip/Compress/BZip2Encoder.cpp b/src/libs/7zip/unix/CPP/7zip/Compress/BZip2Encoder.cpp
index eaa108558..1986aea63 100644
--- a/src/libs/7zip/unix/CPP/7zip/Compress/BZip2Encoder.cpp
+++ b/src/libs/7zip/unix/CPP/7zip/Compress/BZip2Encoder.cpp
@@ -624,7 +624,7 @@ void CThreadInfo::EncodeBlock2(const Byte *block, UInt32 blockSize, UInt32 numPa
UInt32 blockSize0 = blockSize / 2;
for (;(block[blockSize0] == block[blockSize0 - 1] ||
block[blockSize0 - 1] == block[blockSize0 - 2]) &&
- blockSize0 < blockSize; blockSize0++);
+ blockSize0 < blockSize; blockSize0++) {}
if (blockSize0 < blockSize)
{
EncodeBlock2(block, blockSize0, numPasses - 1);
diff --git a/src/libs/7zip/unix/CPP/7zip/Compress/DeflateEncoder.cpp b/src/libs/7zip/unix/CPP/7zip/Compress/DeflateEncoder.cpp
index 35a81cae4..761714a24 100644
--- a/src/libs/7zip/unix/CPP/7zip/Compress/DeflateEncoder.cpp
+++ b/src/libs/7zip/unix/CPP/7zip/Compress/DeflateEncoder.cpp
@@ -263,7 +263,7 @@ NO_INLINE void CCoder::GetMatches()
const Byte *pby2 = pby - (distanceTmp[numPairs - 1] + 1);
if (numAvail > m_MatchMaxLen)
numAvail = m_MatchMaxLen;
- for (; len < numAvail && pby[len] == pby2[len]; len++);
+ for (; len < numAvail && pby[len] == pby2[len]; len++) {}
m_MatchDistances[i - 1] = (UInt16)len;
}
}
diff --git a/src/libs/7zip/unix/CPP/7zip/Compress/HuffmanDecoder.h b/src/libs/7zip/unix/CPP/7zip/Compress/HuffmanDecoder.h
index 82a1e6f2d..74a389a16 100644
--- a/src/libs/7zip/unix/CPP/7zip/Compress/HuffmanDecoder.h
+++ b/src/libs/7zip/unix/CPP/7zip/Compress/HuffmanDecoder.h
@@ -73,7 +73,7 @@ public:
if (value < m_Limits[kNumTableBits])
numBits = m_Lengths[value >> (kNumBitsMax - kNumTableBits)];
else
- for (numBits = kNumTableBits + 1; value >= m_Limits[numBits]; numBits++);
+ for (numBits = kNumTableBits + 1; value >= m_Limits[numBits]; numBits++) {}
bitStream->MovePos(numBits);
UInt32 index = m_Positions[numBits] +
((value - m_Limits[numBits - 1]) >> (kNumBitsMax - numBits));
diff --git a/src/libs/7zip/unix/CPP/7zip/Compress/Mtf8.h b/src/libs/7zip/unix/CPP/7zip/Compress/Mtf8.h
index d15dd4a56..e0264189b 100644
--- a/src/libs/7zip/unix/CPP/7zip/Compress/Mtf8.h
+++ b/src/libs/7zip/unix/CPP/7zip/Compress/Mtf8.h
@@ -16,7 +16,7 @@ struct CMtf8Encoder
int FindAndMove(Byte v)
{
int pos;
- for (pos = 0; Buf[pos] != v; pos++);
+ for (pos = 0; Buf[pos] != v; pos++) {}
int resPos = pos;
for (; pos >= 8; pos -= 8)
{
diff --git a/src/libs/7zip/unix/CPP/7zip/Compress/QuantumDecoder.h b/src/libs/7zip/unix/CPP/7zip/Compress/QuantumDecoder.h
index e9ab023ba..6f1159658 100644
--- a/src/libs/7zip/unix/CPP/7zip/Compress/QuantumDecoder.h
+++ b/src/libs/7zip/unix/CPP/7zip/Compress/QuantumDecoder.h
@@ -147,7 +147,7 @@ public:
{
UInt32 threshold = rangeDecoder->GetThreshold(Freqs[0]);
unsigned i;
- for (i = 1; Freqs[i] > threshold; i++);
+ for (i = 1; Freqs[i] > threshold; i++) {}
rangeDecoder->Decode(Freqs[i], Freqs[i - 1], Freqs[0]);
unsigned res = Values[--i];
do
diff --git a/src/libs/7zip/unix/CPP/7zip/UI/Common/OpenArchive.cpp b/src/libs/7zip/unix/CPP/7zip/UI/Common/OpenArchive.cpp
index 12b8e148a..5e67915bb 100644
--- a/src/libs/7zip/unix/CPP/7zip/UI/Common/OpenArchive.cpp
+++ b/src/libs/7zip/unix/CPP/7zip/UI/Common/OpenArchive.cpp
@@ -177,7 +177,7 @@ HRESULT CArc::OpenStream(
processedSize -= (kNumHashBytes - 1);
for (UInt32 pos = 0; pos < processedSize; pos++)
{
- for (; pos < processedSize && hash[HASH_VAL(buf, pos)] == 0xFF; pos++);
+ for (; pos < processedSize && hash[HASH_VAL(buf, pos)] == 0xFF; pos++) {}
if (pos == processedSize)
break;
UInt32 v = HASH_VAL(buf, pos);
diff --git a/src/libs/7zip/unix/CPP/Common/MyString.cpp b/src/libs/7zip/unix/CPP/Common/MyString.cpp
index 697a35558..1c145f36e 100644
--- a/src/libs/7zip/unix/CPP/Common/MyString.cpp
+++ b/src/libs/7zip/unix/CPP/Common/MyString.cpp
@@ -176,7 +176,7 @@ size_t wcslen(const wchar_t *s)
{
register const wchar_t *p;
- for (p=s ; *p ; p++);
+ for (p=s ; *p ; p++) {}
return p - s;
}
@@ -185,7 +185,7 @@ wchar_t *wcscpy(wchar_t * s1, const wchar_t * s2)
{
register wchar_t *s = s1;
- while ( (*s++ = *s2++) != 0 );
+ while ( (*s++ = *s2++) != 0 ) {}
return s1;
}
@@ -194,9 +194,9 @@ wchar_t *wcscat(wchar_t * s1, const wchar_t * s2)
{
register wchar_t *s = s1;
- while (*s++);
+ while (*s++) {}
--s;
- while ((*s++ = *s2++) != 0);
+ while ((*s++ = *s2++) != 0) {}
return s1;
}
diff --git a/src/libs/7zip/unix/CPP/Common/MyString.h b/src/libs/7zip/unix/CPP/Common/MyString.h
index 3daa137d0..d79b1ce1f 100644
--- a/src/libs/7zip/unix/CPP/Common/MyString.h
+++ b/src/libs/7zip/unix/CPP/Common/MyString.h
@@ -15,7 +15,7 @@ template <class T>
inline int MyStringLen(const T *s)
{
int i;
- for (i = 0; s[i] != '\0'; i++);
+ for (i = 0; s[i] != '\0'; i++) {}
return i;
}
@@ -23,7 +23,7 @@ template <class T>
inline T * MyStringCopy(T *dest, const T *src)
{
T *destStart = dest;
- while ((*dest++ = *src++) != 0);
+ while ((*dest++ = *src++) != 0) {}
return destStart;
}
diff --git a/src/libs/7zip/unix/CPP/Common/MyWindows.cpp b/src/libs/7zip/unix/CPP/Common/MyWindows.cpp
index bee4acd47..4037d5ea3 100644
--- a/src/libs/7zip/unix/CPP/Common/MyWindows.cpp
+++ b/src/libs/7zip/unix/CPP/Common/MyWindows.cpp
@@ -14,7 +14,7 @@ static inline void FreeForBSTR(void *pv) { ::free(pv);}
static UINT MyStringLen(const wchar_t *s)
{
UINT i;
- for (i = 0; s[i] != '\0'; i++);
+ for (i = 0; s[i] != '\0'; i++) {}
return i;
}
diff --git a/src/libs/7zip/unix/CPP/Windows/FileIO.cpp b/src/libs/7zip/unix/CPP/Windows/FileIO.cpp
index a731813f3..5080579fe 100644
--- a/src/libs/7zip/unix/CPP/Windows/FileIO.cpp
+++ b/src/libs/7zip/unix/CPP/Windows/FileIO.cpp
@@ -37,7 +37,7 @@ CFileBase::~CFileBase()
}
bool CFileBase::Create(LPCSTR filename, DWORD dwDesiredAccess,
- DWORD dwShareMode, DWORD dwCreationDisposition, DWORD dwFlagsAndAttributes,bool ignoreSymbolicLink)
+ DWORD /*dwShareMode*/, DWORD dwCreationDisposition, DWORD /*dwFlagsAndAttributes*/,bool ignoreSymbolicLink)
{
Close();