Remove cppcheck suppression by replacing use of local variable to alias this->m_variables

- The name of the local variable would clash with the namespace of the
  same name, which may have lead cppcheck to think the variable was not
  used.
This commit is contained in:
Eduardo Arias 2024-10-21 15:30:23 -03:00
parent ce9a3167fa
commit cdaf32f521

View File

@ -203,7 +203,6 @@ inline void RuleWithOperator::getFinalVars(variables::Variables *vars,
bool RuleWithOperator::evaluate(Transaction *trans,
RuleMessage &ruleMessage) {
bool globalRet = false;
const variables::Variables *variables = this->m_variables; // cppcheck-suppress unreadVariable ; false positive
bool recursiveGlobalRet;
bool containsBlock = hasBlockAction();
std::string eparam;
@ -246,12 +245,12 @@ bool RuleWithOperator::evaluate(Transaction *trans,
+ "\" with param " \
+ eparam \
+ " against " \
+ variables + ".");
+ m_variables + ".");
} else {
ms_dbg_a(trans, 4, "(Rule: " + std::to_string(m_ruleId) \
+ ") Executing operator \"" + getOperatorName() \
+ " against " \
+ variables + ".");
+ m_variables + ".");
}