Fixed #3347 (False positive: unused function (taking address))

This commit is contained in:
Daniel Marjamäki 2011-11-21 19:12:54 +01:00
parent 9aa8a49677
commit 0dd05e0d56
1 changed files with 3 additions and 3 deletions

View File

@ -348,6 +348,9 @@ void CppCheck::checkFile(const std::string &code, const char FileName[])
(*it)->runChecks(&_tokenizer, &_settings, this);
}
if (_settings.isEnabled("unusedFunction") && _settings._jobs == 1)
_checkUnusedFunctions.parseTokens(_tokenizer);
Timer timer3("Tokenizer::simplifyTokenList", _settings._showtime, &S_timerResults);
result = _tokenizer.simplifyTokenList();
timer3.Stop();
@ -358,9 +361,6 @@ void CppCheck::checkFile(const std::string &code, const char FileName[])
_tokenizer.fillFunctionList();
timer4.Stop();
if (_settings.isEnabled("unusedFunction") && _settings._jobs == 1)
_checkUnusedFunctions.parseTokens(_tokenizer);
// call all "runSimplifiedChecks" in all registered Check classes
for (std::list<Check *>::iterator it = Check::instances().begin(); it != Check::instances().end(); ++it) {
if (_settings.terminated())