Skip to content

Commit cdaf32f

Browse files
committed
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.
1 parent ce9a316 commit cdaf32f

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/rule_with_operator.cc

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,6 @@ inline void RuleWithOperator::getFinalVars(variables::Variables *vars,
203203
bool RuleWithOperator::evaluate(Transaction *trans,
204204
RuleMessage &ruleMessage) {
205205
bool globalRet = false;
206-
const variables::Variables *variables = this->m_variables; // cppcheck-suppress unreadVariable ; false positive
207206
bool recursiveGlobalRet;
208207
bool containsBlock = hasBlockAction();
209208
std::string eparam;
@@ -246,12 +245,12 @@ bool RuleWithOperator::evaluate(Transaction *trans,
246245
+ "\" with param " \
247246
+ eparam \
248247
+ " against " \
249-
+ variables + ".");
248+
+ m_variables + ".");
250249
} else {
251250
ms_dbg_a(trans, 4, "(Rule: " + std::to_string(m_ruleId) \
252251
+ ") Executing operator \"" + getOperatorName() \
253252
+ " against " \
254-
+ variables + ".");
253+
+ m_variables + ".");
255254
}
256255

257256

0 commit comments

Comments
 (0)