More Cppcheck fixes

Former-commit-id: 62ab1caa04543da1a169812bb92a450d44f3aec1
This commit is contained in:
Lynix
2015-06-07 00:21:53 +02:00
parent d1258c2a6d
commit f8682d227b
7 changed files with 41 additions and 28 deletions

View File

@@ -588,7 +588,7 @@ void SHA256_Init(SHA_CTX* context)
void SHA256_Internal_Transform(SHA_CTX* context, const nzUInt32* data)
{
nzUInt32 a, b, c, d, e, f, g, h, s0, s1;
nzUInt32 a, b, c, d, e, f, g, h;
nzUInt32 T1, *W256;
int j;
@@ -622,6 +622,8 @@ void SHA256_Internal_Transform(SHA_CTX* context, const nzUInt32* data)
/* Now for the remaining rounds to 64: */
do
{
nzUInt32 s0, s1;
ROUND256(a,b,c,d,e,f,g,h);
ROUND256(h,a,b,c,d,e,f,g);
ROUND256(g,h,a,b,c,d,e,f);

View File

@@ -104,6 +104,9 @@ nzUInt8 NzHashDigest::operator[](unsigned int pos) const
NzHashDigest& NzHashDigest::operator=(const NzHashDigest& rhs)
{
if (this == &rhs)
return *this;
m_hashName = rhs.m_hashName;
m_digestLength = rhs.m_digestLength;

View File

@@ -1097,7 +1097,7 @@ unsigned int NzString::FindLastWord(const char* string, int start, nzUInt32 flag
{
if (it.base() != m_sharedString->string)
{
it--;
--it;
if (!(NzUnicode::GetCategory(*it++) & NzUnicode::Category_Separator))
continue;
}
@@ -1139,7 +1139,7 @@ unsigned int NzString::FindLastWord(const char* string, int start, nzUInt32 flag
{
if (it.base() != m_sharedString->string)
{
it--;
--it;
if (!(NzUnicode::GetCategory(*it++) & NzUnicode::Category_Separator))
continue;
}
@@ -1280,7 +1280,7 @@ unsigned int NzString::FindLastWord(const NzString& string, int start, nzUInt32
{
if (it.base() != m_sharedString->string)
{
it--;
--it;
if (!(NzUnicode::GetCategory(*it++) & NzUnicode::Category_Separator))
continue;
}
@@ -1322,7 +1322,7 @@ unsigned int NzString::FindLastWord(const NzString& string, int start, nzUInt32
{
if (it.base() != m_sharedString->string)
{
it--;
--it;
if (!(NzUnicode::GetCategory(*it++) & NzUnicode::Category_Separator))
continue;
}
@@ -1456,7 +1456,7 @@ unsigned int NzString::FindWord(const char* string, int start, nzUInt32 flags) c
{
if (it.base() != m_sharedString->string)
{
it--;
--it;
if (!(NzUnicode::GetCategory(*it++) & NzUnicode::Category_Separator))
continue;
}
@@ -1478,8 +1478,8 @@ unsigned int NzString::FindWord(const char* string, int start, nzUInt32 flags) c
if (NzUnicode::GetLowercase(*tIt) != NzUnicode::GetLowercase(*p))
break;
p++;
tIt++;
++p;
++tIt;
}
}
}
@@ -1496,7 +1496,7 @@ unsigned int NzString::FindWord(const char* string, int start, nzUInt32 flags) c
{
if (it.base() != m_sharedString->string)
{
it--;
--it;
if (!(NzUnicode::GetCategory(*it++) & NzUnicode::Category_Separator))
continue;
}
@@ -1518,8 +1518,8 @@ unsigned int NzString::FindWord(const char* string, int start, nzUInt32 flags) c
if (*tIt != *p)
break;
p++;
tIt++;
++p;
++tIt;
}
}
}
@@ -1628,7 +1628,7 @@ unsigned int NzString::FindWord(const NzString& string, int start, nzUInt32 flag
{
if (it.base() != m_sharedString->string)
{
it--;
--it;
if (!(NzUnicode::GetCategory(*it++) & NzUnicode::Category_Separator))
continue;
}
@@ -1650,8 +1650,8 @@ unsigned int NzString::FindWord(const NzString& string, int start, nzUInt32 flag
if (NzUnicode::GetLowercase(*tIt) != NzUnicode::GetLowercase(*p))
break;
p++;
tIt++;
++p;
++tIt;
}
}
}
@@ -1668,7 +1668,7 @@ unsigned int NzString::FindWord(const NzString& string, int start, nzUInt32 flag
{
if (it.base() != m_sharedString->string)
{
it--;
--it;
if (!(NzUnicode::GetCategory(*it++) & NzUnicode::Category_Separator))
continue;
}
@@ -1690,8 +1690,8 @@ unsigned int NzString::FindWord(const NzString& string, int start, nzUInt32 flag
if (*tIt != *p)
break;
p++;
tIt++;
++p;
++tIt;
}
}
}