Fix #1069 (Minor spelling mistake across cppcheck)

http://sourceforge.net/apps/trac/cppcheck/ticket/1069
This commit is contained in:
Reijo Tomperi 2009-12-08 20:10:08 +02:00
parent 798e07dee4
commit db30c5b0d2
2 changed files with 5 additions and 5 deletions

View File

@ -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");
}

View File

@ -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()