From db30c5b0d214b2a6b2bf9f1c44aa1172f60d82b4 Mon Sep 17 00:00:00 2001 From: Reijo Tomperi Date: Tue, 8 Dec 2009 20:10:08 +0200 Subject: [PATCH] Fix #1069 (Minor spelling mistake across cppcheck) http://sourceforge.net/apps/trac/cppcheck/ticket/1069 --- lib/checkautovariables.cpp | 6 +++--- test/testautovariables.cpp | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/checkautovariables.cpp b/lib/checkautovariables.cpp index 51864f05c..e35f92a63 100644 --- a/lib/checkautovariables.cpp +++ b/lib/checkautovariables.cpp @@ -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"); } diff --git a/test/testautovariables.cpp b/test/testautovariables.cpp index be3290db0..1f914d79f 100644 --- a/test/testautovariables.cpp +++ b/test/testautovariables.cpp @@ -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()