unusedFunction disabled warning is not printed if --cppcheck-build-dir is used (#5252)

ususedFunction check is enabled if cppcheck build dir is used. Warning
about disabled unusedFunction check should not be printed in such case.
This commit is contained in:
Samuel Poláček 2023-07-25 12:00:23 +02:00 committed by GitHub
parent 2cf4b3a6f3
commit ba764eaddc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -1031,7 +1031,7 @@ bool CmdLineParser::parseFromArgs(int argc, const char* const argv[])
else if ((def || mSettings.preprocessOnly) && !maxconfigs)
mSettings.maxConfigs = 1U;
if (mSettings.checks.isEnabled(Checks::unusedFunction) && mSettings.jobs > 1) {
if (mSettings.checks.isEnabled(Checks::unusedFunction) && mSettings.jobs > 1 && mSettings.buildDir.empty()) {
printMessage("unusedFunction check can't be used with '-j' option. Disabling unusedFunction check.");
}