Suppress warning about non-existing path given to -I with --quiet.

This commit is contained in:
Kamil Dudka 2014-01-10 21:50:21 +01:00 committed by Daniel Marjamäki
parent 2f30f9aa13
commit 1f53018b8e
1 changed files with 4 additions and 3 deletions

View File

@ -80,9 +80,10 @@ bool CppCheckExecutor::parseFromArgs(CppCheck *cppcheck, int argc, const char* c
if (FileLister::isDirectory(path))
++iter;
else {
// If the include path is not found, warn user and remove the
// non-existing path from the list.
std::cout << "cppcheck: warning: Couldn't find path given by -I '" << path << '\'' << std::endl;
// If the include path is not found, warn user (unless --quiet
// was used) and remove the non-existing path from the list.
if (!settings._errorsOnly)
std::cout << "cppcheck: warning: Couldn't find path given by -I '" << path << '\'' << std::endl;
iter = settings._includePaths.erase(iter);
}
}