Fix Misra C++ warning 'Limited dependence should be placed on C++ operator precedence rules in expressions.'

This commit is contained in:
Daniel Marjamäki 2022-12-17 20:45:44 +01:00
parent e5721030ca
commit c736d60642
1 changed files with 1 additions and 1 deletions

View File

@ -390,7 +390,7 @@ static std::string arrayIndexMessage(const Token* tok,
std::ostringstream errmsg;
if (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
errmsg << "Array '" << array << "' accessed at index " << stringifyIndexes(tok->astOperand1()->expressionString(), indexValues) << ", which is out of bounds.";