Fix ticket #434 (Unused function gets reported dozens of times)

http://sourceforge.net/apps/trac/cppcheck/ticket/434
Using --unused-functions with -j will now print out error message:
"cppcheck: error: --unused-functions can't be used with -j option."
This commit is contained in:
Reijo Tomperi 2009-07-02 23:29:52 +03:00
parent a415ab1e5c
commit ea0035ec3a
1 changed files with 5 additions and 0 deletions

View File

@ -248,6 +248,11 @@ std::string CppCheck::parseFromArgs(int argc, const char* const argv[])
pathnames.push_back(argv[i]);
}
if (_settings._unusedFunctions && _settings._jobs > 1)
{
return "cppcheck: error: --unused-functions can't be used with -j option.\n";
}
if (pathnames.size() > 0)
{
// Execute RecursiveAddFiles() to each given file parameter