Fixed #3347 (False positive: unused function (taking address))
This commit is contained in:
parent
9aa8a49677
commit
0dd05e0d56
|
@ -348,6 +348,9 @@ void CppCheck::checkFile(const std::string &code, const char FileName[])
|
||||||
(*it)->runChecks(&_tokenizer, &_settings, this);
|
(*it)->runChecks(&_tokenizer, &_settings, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (_settings.isEnabled("unusedFunction") && _settings._jobs == 1)
|
||||||
|
_checkUnusedFunctions.parseTokens(_tokenizer);
|
||||||
|
|
||||||
Timer timer3("Tokenizer::simplifyTokenList", _settings._showtime, &S_timerResults);
|
Timer timer3("Tokenizer::simplifyTokenList", _settings._showtime, &S_timerResults);
|
||||||
result = _tokenizer.simplifyTokenList();
|
result = _tokenizer.simplifyTokenList();
|
||||||
timer3.Stop();
|
timer3.Stop();
|
||||||
|
@ -358,9 +361,6 @@ void CppCheck::checkFile(const std::string &code, const char FileName[])
|
||||||
_tokenizer.fillFunctionList();
|
_tokenizer.fillFunctionList();
|
||||||
timer4.Stop();
|
timer4.Stop();
|
||||||
|
|
||||||
if (_settings.isEnabled("unusedFunction") && _settings._jobs == 1)
|
|
||||||
_checkUnusedFunctions.parseTokens(_tokenizer);
|
|
||||||
|
|
||||||
// call all "runSimplifiedChecks" in all registered Check classes
|
// call all "runSimplifiedChecks" in all registered Check classes
|
||||||
for (std::list<Check *>::iterator it = Check::instances().begin(); it != Check::instances().end(); ++it) {
|
for (std::list<Check *>::iterator it = Check::instances().begin(); it != Check::instances().end(); ++it) {
|
||||||
if (_settings.terminated())
|
if (_settings.terminated())
|
||||||
|
|
Loading…
Reference in New Issue