Fixed some cppcheck messages
This commit is contained in:
parent
3342ea4c54
commit
8225b12763
|
@ -1,5 +1,6 @@
|
||||||
unusedPrivateFunction:test/testcmdlineparser.cpp
|
unusedPrivateFunction:test/testcmdlineparser.cpp
|
||||||
redundantNextPrevious:test/testtoken.cpp
|
redundantNextPrevious:test/testtoken.cpp
|
||||||
|
simplePatternError:test/testtoken.cpp
|
||||||
uselessAssignmentPtrArg:build/checkstl.cpp
|
uselessAssignmentPtrArg:build/checkstl.cpp
|
||||||
uselessAssignmentPtrArg:build/tokenize.cpp
|
uselessAssignmentPtrArg:build/tokenize.cpp
|
||||||
variableScope:test/testtokenize.cpp
|
variableScope:test/testtokenize.cpp
|
||||||
|
|
|
@ -353,7 +353,7 @@ void CheckLeakAutoVar::checkScope(const Token * const startToken,
|
||||||
}
|
}
|
||||||
|
|
||||||
// unknown control.. (TODO: handle loops)
|
// 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();
|
varInfo->clear();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -196,7 +196,7 @@ void CheckUnusedFunctions::parseTokens(const Tokenizer &tokenizer, const char Fi
|
||||||
|
|
||||||
if (funcname) {
|
if (funcname) {
|
||||||
FunctionUsage &func = _functions[ funcname->str()];
|
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)
|
if (func.filename.empty() || func.filename == "+" || func.filename != called_from_file)
|
||||||
func.usedOtherFile = true;
|
func.usedOtherFile = true;
|
||||||
|
|
Loading…
Reference in New Issue