Fixed recently introduced assertion failure in debug mode
This commit is contained in:
parent
b6057a1148
commit
4587a1a06c
|
@ -1173,7 +1173,7 @@ void CheckOther::checkIncorrectLogicOperator()
|
||||||
incorrectLogicOperatorError(term1Tok, text, conditions[i].error == AlwaysTrue);
|
incorrectLogicOperatorError(term1Tok, text, conditions[i].error == AlwaysTrue);
|
||||||
} else {
|
} else {
|
||||||
const std::string text = "If " + cond1str + ", the comparison " + cond2str +
|
const std::string text = "If " + cond1str + ", the comparison " + cond2str +
|
||||||
" is always " + ((conditions[i].error == SecondTrue || conditions[i].error == AlwaysTrue) ? "true" : "false") + ".\n";
|
" is always " + ((conditions[i].error == SecondTrue || conditions[i].error == AlwaysTrue) ? "true" : "false") + ".";
|
||||||
redundantConditionError(term1Tok, text);
|
redundantConditionError(term1Tok, text);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -350,7 +350,7 @@ private:
|
||||||
c.assignmentInAssertError(0, "varname");
|
c.assignmentInAssertError(0, "varname");
|
||||||
c.invalidScanfError(0);
|
c.invalidScanfError(0);
|
||||||
c.incorrectLogicOperatorError(0, "foo > 3 && foo < 4", true);
|
c.incorrectLogicOperatorError(0, "foo > 3 && foo < 4", true);
|
||||||
c.redundantConditionError(0, "when first comparison is true, the 2nd comparison is always true");
|
c.redundantConditionError(0, "If x > 10 the condition x > 11 is always true.");
|
||||||
c.memsetZeroBytesError(0, "varname");
|
c.memsetZeroBytesError(0, "varname");
|
||||||
c.clarifyCalculationError(0, "+");
|
c.clarifyCalculationError(0, "+");
|
||||||
c.clarifyConditionError(0, true, false);
|
c.clarifyConditionError(0, true, false);
|
||||||
|
|
Loading…
Reference in New Issue