Skip to content

Commit b1c1ef2

Browse files
Update forwardanalyzer.cpp
1 parent fbc814a commit b1c1ef2

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

lib/forwardanalyzer.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -682,9 +682,11 @@ namespace {
682682
}
683683
} else if (tok->isControlFlowKeyword() && Token::Match(tok, "if|while|for (") &&
684684
Token::simpleMatch(tok->linkAt(1), ") {")) {
685-
if (settings.severity.isEnabled(Severity::information) && (settings.vfOptions.maxForwardBranches > 0) && (++branchCount > settings.vfOptions.maxForwardBranches)) {
685+
if ((settings.vfOptions.maxForwardBranches > 0) && (++branchCount > settings.vfOptions.maxForwardBranches)) {
686686
// TODO: should be logged on function-level instead of file-level
687-
reportError(Severity::information, "normalCheckLevelMaxBranches", "Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.");
687+
if (settings.severity.isEnabled(Severity::information)) {
688+
reportError(Severity::information, "normalCheckLevelMaxBranches", "Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.");
689+
}
688690
return Break(Analyzer::Terminate::Bail);
689691
}
690692
Token* endCond = tok->linkAt(1);

0 commit comments

Comments
 (0)