Skip to content

Commit fe2254b

Browse files
Update checkother.cpp
1 parent 922571c commit fe2254b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎lib/checkother.cpp‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2570,8 +2570,8 @@ void CheckOtherImpl::zerodivError(const Token *tok, const ValueFlow::Value *valu
25702570
errmsg << "Division by zero.";
25712571

25722572
reportError(std::move(errorPath),
2573-
value->errorSeverity() ? Severity::error : Severity::warning,
2574-
value->condition ? "zerodivcond" : "zerodiv",
2573+
(value->errorSeverity() && !value->conditional) ? Severity::error : Severity::warning,
2574+
(value->condition || value->conditional) ? "zerodivcond" : "zerodiv",
25752575
errmsg.str(), CWE369, value->isInconclusive() ? Certainty::inconclusive : Certainty::normal);
25762576
}
25772577

0 commit comments

Comments
 (0)