mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-13 21:36:00 +03:00
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:
parent
ce9a3167fa
commit
cdaf32f521
@ -203,7 +203,6 @@ inline void RuleWithOperator::getFinalVars(variables::Variables *vars,
|
|||||||
bool RuleWithOperator::evaluate(Transaction *trans,
|
bool RuleWithOperator::evaluate(Transaction *trans,
|
||||||
RuleMessage &ruleMessage) {
|
RuleMessage &ruleMessage) {
|
||||||
bool globalRet = false;
|
bool globalRet = false;
|
||||||
const variables::Variables *variables = this->m_variables; // cppcheck-suppress unreadVariable ; false positive
|
|
||||||
bool recursiveGlobalRet;
|
bool recursiveGlobalRet;
|
||||||
bool containsBlock = hasBlockAction();
|
bool containsBlock = hasBlockAction();
|
||||||
std::string eparam;
|
std::string eparam;
|
||||||
@ -246,12 +245,12 @@ bool RuleWithOperator::evaluate(Transaction *trans,
|
|||||||
+ "\" with param " \
|
+ "\" with param " \
|
||||||
+ eparam \
|
+ eparam \
|
||||||
+ " against " \
|
+ " against " \
|
||||||
+ variables + ".");
|
+ m_variables + ".");
|
||||||
} else {
|
} else {
|
||||||
ms_dbg_a(trans, 4, "(Rule: " + std::to_string(m_ruleId) \
|
ms_dbg_a(trans, 4, "(Rule: " + std::to_string(m_ruleId) \
|
||||||
+ ") Executing operator \"" + getOperatorName() \
|
+ ") Executing operator \"" + getOperatorName() \
|
||||||
+ " against " \
|
+ " against " \
|
||||||
+ variables + ".");
|
+ m_variables + ".");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user