@@ -656,7 +656,7 @@ unsigned int CppCheck::checkFile(const std::string& filename, const std::string
656
656
657
657
try {
658
658
if (mSettings .library .markupFile (filename)) {
659
- if (mUnusedFunctionsCheck && mSettings .isUnusedFunctionCheckEnabled () && mSettings .buildDir .empty ()) {
659
+ if (mUnusedFunctionsCheck && mSettings .useSingleJob () && mSettings .buildDir .empty ()) {
660
660
// this is not a real source file - we just want to tokenize it. treat it as C anyways as the language needs to be determined.
661
661
Tokenizer tokenizer (mSettings , this );
662
662
tokenizer.list .setLang (Standards::Language::C);
@@ -1036,7 +1036,7 @@ unsigned int CppCheck::checkFile(const std::string& filename, const std::string
1036
1036
// In jointSuppressionReport mode, unmatched suppressions are
1037
1037
// collected after all files are processed
1038
1038
if (!mSettings .useSingleJob () && (mSettings .severity .isEnabled (Severity::information) || mSettings .checkConfiguration )) {
1039
- SuppressionList::reportUnmatchedSuppressions (mSettings .supprs .nomsg .getUnmatchedLocalSuppressions (filename, mSettings . isUnusedFunctionCheckEnabled () ), *this );
1039
+ SuppressionList::reportUnmatchedSuppressions (mSettings .supprs .nomsg .getUnmatchedLocalSuppressions (filename, ( bool ) mUnusedFunctionsCheck ), *this );
1040
1040
}
1041
1041
1042
1042
mErrorList .clear ();
@@ -1107,7 +1107,7 @@ void CppCheck::checkNormalTokens(const Tokenizer &tokenizer)
1107
1107
if (mSettings .checks .isEnabled (Checks::unusedFunction) && !mSettings .buildDir .empty ()) {
1108
1108
unusedFunctionsChecker.parseTokens (tokenizer, mSettings );
1109
1109
}
1110
- if (mUnusedFunctionsCheck && mSettings .isUnusedFunctionCheckEnabled () && mSettings .buildDir .empty ()) {
1110
+ if (mUnusedFunctionsCheck && mSettings .useSingleJob () && mSettings .buildDir .empty ()) {
1111
1111
mUnusedFunctionsCheck ->parseTokens (tokenizer, mSettings );
1112
1112
}
1113
1113
0 commit comments