diff --git a/.travis_suppressions b/.travis_suppressions index 48c696303..3b97b744e 100644 --- a/.travis_suppressions +++ b/.travis_suppressions @@ -1,5 +1,6 @@ unusedPrivateFunction:test/testcmdlineparser.cpp redundantNextPrevious:test/testtoken.cpp +simplePatternError:test/testtoken.cpp uselessAssignmentPtrArg:build/checkstl.cpp uselessAssignmentPtrArg:build/tokenize.cpp variableScope:test/testtokenize.cpp diff --git a/lib/checkleakautovar.cpp b/lib/checkleakautovar.cpp index 067f12ea7..c19db3f59 100644 --- a/lib/checkleakautovar.cpp +++ b/lib/checkleakautovar.cpp @@ -353,7 +353,7 @@ void CheckLeakAutoVar::checkScope(const Token * const startToken, } // unknown control.. (TODO: handle loops) - else if ((Token::Match(tok, "%type% (") && Token::simpleMatch(tok->linkAt(1), ") {")) || Token::Match(tok, "do {")) { + else if ((Token::Match(tok, "%type% (") && Token::simpleMatch(tok->linkAt(1), ") {")) || Token::simpleMatch(tok, "do {")) { varInfo->clear(); break; } diff --git a/lib/checkunusedfunctions.cpp b/lib/checkunusedfunctions.cpp index 639a3cf99..2f3017bcd 100644 --- a/lib/checkunusedfunctions.cpp +++ b/lib/checkunusedfunctions.cpp @@ -196,7 +196,7 @@ void CheckUnusedFunctions::parseTokens(const Tokenizer &tokenizer, const char Fi if (funcname) { FunctionUsage &func = _functions[ funcname->str()]; - const std::string called_from_file = tokenizer.list.getSourceFilePath(); + const std::string& called_from_file = tokenizer.list.getSourceFilePath(); if (func.filename.empty() || func.filename == "+" || func.filename != called_from_file) func.usedOtherFile = true;