From cdaf32f521ba91e88781b9484e6026be2cbcffb3 Mon Sep 17 00:00:00 2001 From: Eduardo Arias Date: Mon, 21 Oct 2024 15:30:23 -0300 Subject: [PATCH] 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. --- src/rule_with_operator.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/rule_with_operator.cc b/src/rule_with_operator.cc index acabde39..a7f7918a 100644 --- a/src/rule_with_operator.cc +++ b/src/rule_with_operator.cc @@ -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 + "."); }