spelling fixes

This commit is contained in:
Ettl Martin 2012-07-31 23:35:56 +02:00
parent dce16a970d
commit 98d608231d
4 changed files with 13 additions and 13 deletions

View File

@ -2549,7 +2549,7 @@ void CheckOther::checkExpressionRange(const std::list<const Function*> &constFun
for (; it != expressions.getMap().end(); ++it) {
// check expression..
bool valid = true;
unsigned int parantheses = 0; // ()
unsigned int parenthesis = 0; // ()
unsigned int brackets = 0; // []
// taking address?
@ -2559,13 +2559,13 @@ void CheckOther::checkExpressionRange(const std::list<const Function*> &constFun
for (const Token *tok = it->second.start; tok && tok != it->second.end; tok = tok->next()) {
if (tok->str() == "(") {
++parantheses;
++parenthesis;
} else if (tok->str() == ")") {
if (parantheses == 0) {
if (parenthesis == 0) {
valid = false;
break;
}
--parantheses;
--parenthesis;
} else if (tok->str() == "[") {
++brackets;
} else if (tok->str() == "]") {
@ -2580,7 +2580,7 @@ void CheckOther::checkExpressionRange(const std::list<const Function*> &constFun
}
}
if (!valid || parantheses!=0 || brackets!=0)
if (!valid || parenthesis!=0 || brackets!=0)
continue;
const ExpressionTokens &expr = it->second;

View File

@ -363,7 +363,7 @@ private:
/** @brief array dimensions */
std::vector<Dimension> _dimensions;
/** @brief fill in information, depending on Tokens given at instanciation */
/** @brief fill in information, depending on Tokens given at instantiation */
void evaluate();
};

View File

@ -7388,17 +7388,17 @@ bool Tokenizer::isFunctionParameterPassedByValue(const Token *fpar) const
const Token *ftok;
// Look at function call, what parameter number is it?
unsigned int paranthesis = 1;
unsigned int parenthesis = 1;
unsigned int parameter = 1;
for (ftok = fpar; ftok; ftok = ftok->previous()) {
if (ftok->str() == "(") {
--paranthesis;
if (paranthesis == 0) {
--parenthesis;
if (parenthesis == 0) {
break;
}
} else if (ftok->str() == ")") {
++paranthesis;
} else if (paranthesis == 1 && ftok->str() == ",") {
++parenthesis;
} else if (parenthesis == 1 && ftok->str() == ",") {
++parameter;
} else if (Token::Match(ftok, "[;{}]")) {
break;

View File

@ -142,7 +142,7 @@ private:
TEST_CASE(duplicateIf);
TEST_CASE(duplicateIf1); // ticket 3689
TEST_CASE(duplicateBranch);
TEST_CASE(duplicateBranch1); // tests extracted by http://www.viva64.com/en/b/0149/ ( Comparision between PVS-Studio and cppcheck ): Errors detected in Quake 3: Arena by PVS-Studio: Fragement 2
TEST_CASE(duplicateBranch1); // tests extracted by http://www.viva64.com/en/b/0149/ ( Comparison between PVS-Studio and cppcheck ): Errors detected in Quake 3: Arena by PVS-Studio: Fragement 2
TEST_CASE(duplicateExpression1);
TEST_CASE(duplicateExpression2); // ticket #2730
TEST_CASE(duplicateExpression3); // ticket #3317
@ -4070,7 +4070,7 @@ private:
void duplicateBranch1() {
// tests inspired by http://www.viva64.com/en/b/0149/ ( Comparision between PVS-Studio and cppcheck )
// tests inspired by http://www.viva64.com/en/b/0149/ ( Comparison between PVS-Studio and cppcheck )
// Errors detected in Quake 3: Arena by PVS-Studio: Fragement 2
check("void f()\n"
"{\n"