diff --git a/lib/checkstl.cpp b/lib/checkstl.cpp index 9cfe45a97..76a9392ec 100644 --- a/lib/checkstl.cpp +++ b/lib/checkstl.cpp @@ -505,12 +505,12 @@ void CheckStl::find() break; if (tok2->varId() == iteratorid && Token::simpleMatch(tok2->previous(), "*")) findError(tok2); - } + } } } - - + + void CheckStl::findError(const Token *tok) { - reportError(tok, Severity::error, "stlfind", "dangerous usage of find result"); + reportError(tok, Severity::error, "stlfind", "dangerous usage of find result"); } diff --git a/lib/checkstl.h b/lib/checkstl.h index 11861be6d..30882b0f9 100644 --- a/lib/checkstl.h +++ b/lib/checkstl.h @@ -92,7 +92,7 @@ public: * bad condition.. "it < alist.end()" */ void stlBoundries(); - + /** usage of std::find */ void find(); diff --git a/test/teststl.cpp b/test/teststl.cpp index 1bfb552ad..ceab30042 100644 --- a/test/teststl.cpp +++ b/test/teststl.cpp @@ -68,7 +68,7 @@ private: TEST_CASE(stlBoundries1); TEST_CASE(stlBoundries2); TEST_CASE(stlBoundries3); - + // find TEST_CASE(find1); }