diff --git a/lib/checkother.cpp b/lib/checkother.cpp index 7c234cf55..7096bff53 100644 --- a/lib/checkother.cpp +++ b/lib/checkother.cpp @@ -1173,7 +1173,7 @@ void CheckOther::checkIncorrectLogicOperator() incorrectLogicOperatorError(term1Tok, text, conditions[i].error == AlwaysTrue); } else { 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); } break; diff --git a/lib/checkother.h b/lib/checkother.h index 7764aeeaa..380a64681 100644 --- a/lib/checkother.h +++ b/lib/checkother.h @@ -350,7 +350,7 @@ private: c.assignmentInAssertError(0, "varname"); c.invalidScanfError(0); 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.clarifyCalculationError(0, "+"); c.clarifyConditionError(0, true, false);