Fix Misra C++ warning 'Limited dependence should be placed on C++ operator precedence rules in expressions.'
This commit is contained in:
parent
e5721030ca
commit
c736d60642
|
@ -390,7 +390,7 @@ static std::string arrayIndexMessage(const Token* tok,
|
||||||
std::ostringstream errmsg;
|
std::ostringstream errmsg;
|
||||||
if (condition)
|
if (condition)
|
||||||
errmsg << ValueFlow::eitherTheConditionIsRedundant(condition)
|
errmsg << ValueFlow::eitherTheConditionIsRedundant(condition)
|
||||||
<< " or the array '" + array + "' is accessed at index " << stringifyIndexes(tok->astOperand1()->expressionString(), indexValues) << ", which is out of bounds.";
|
<< " or the array '" << array << "' is accessed at index " << stringifyIndexes(tok->astOperand1()->expressionString(), indexValues) << ", which is out of bounds.";
|
||||||
else
|
else
|
||||||
errmsg << "Array '" << array << "' accessed at index " << stringifyIndexes(tok->astOperand1()->expressionString(), indexValues) << ", which is out of bounds.";
|
errmsg << "Array '" << array << "' accessed at index " << stringifyIndexes(tok->astOperand1()->expressionString(), indexValues) << ", which is out of bounds.";
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue