Fix #1069 (Minor spelling mistake across cppcheck)
http://sourceforge.net/apps/trac/cppcheck/ticket/1069
This commit is contained in:
parent
798e07dee4
commit
db30c5b0d2
|
@ -193,12 +193,12 @@ void CheckAutoVariables::autoVariables()
|
|||
{
|
||||
addVD(tok->tokAt(2)->varId());
|
||||
}
|
||||
//Critical assignement
|
||||
//Critical assignment
|
||||
else if (Token::Match(tok, "[;{}] %var% = & %var%") && errorAv(tok->tokAt(1), tok->tokAt(4)))
|
||||
{
|
||||
errorAutoVariableAssignment(tok);
|
||||
}
|
||||
//Critical assignement
|
||||
//Critical assignment
|
||||
else if (Token::Match(tok, "[;{}] %var% [ %any% ] = & %var%") && errorAv(tok->tokAt(1), tok->tokAt(7)))
|
||||
{
|
||||
errorAutoVariableAssignment(tok);
|
||||
|
@ -300,6 +300,6 @@ void CheckAutoVariables::errorReturnPointerToLocalArray(const Token *tok)
|
|||
|
||||
void CheckAutoVariables::errorAutoVariableAssignment(const Token *tok)
|
||||
{
|
||||
reportError(tok, Severity::error, "autoVariables", "Wrong assignement of an auto-variable to an effective parameter of a function");
|
||||
reportError(tok, Severity::error, "autoVariables", "Wrong assignment of an auto-variable to an effective parameter of a function");
|
||||
}
|
||||
|
||||
|
|
|
@ -79,7 +79,7 @@ private:
|
|||
"{\n"
|
||||
" int num=2;"
|
||||
"res=#}");
|
||||
ASSERT_EQUALS("[test.cpp:3]: (error) Wrong assignement of an auto-variable to an effective parameter of a function\n", errout.str());
|
||||
ASSERT_EQUALS("[test.cpp:3]: (error) Wrong assignment of an auto-variable to an effective parameter of a function\n", errout.str());
|
||||
|
||||
check("void func1(int **res)\n"
|
||||
"{\n"
|
||||
|
@ -95,7 +95,7 @@ private:
|
|||
"{\n"
|
||||
" int num=2;"
|
||||
"arr[0]=#}");
|
||||
ASSERT_EQUALS("[test.cpp:3]: (error) Wrong assignement of an auto-variable to an effective parameter of a function\n", errout.str());
|
||||
ASSERT_EQUALS("[test.cpp:3]: (error) Wrong assignment of an auto-variable to an effective parameter of a function\n", errout.str());
|
||||
}
|
||||
|
||||
void testautovar_return()
|
||||
|
|
Loading…
Reference in New Issue