mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-14 05:45:59 +03:00
Change arg from pass-by-value (satisify cppcheck)
This commit is contained in:
parent
c34bd91a42
commit
9ea50a4973
@ -43,7 +43,7 @@ Driver::~Driver() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int Driver::addSecMarker(std::string marker, std::unique_ptr<std::string> fileName, int lineNumber) {
|
int Driver::addSecMarker(const std::string& marker, std::unique_ptr<std::string> fileName, int lineNumber) {
|
||||||
// FIXME: we might move this to the parser.
|
// FIXME: we might move this to the parser.
|
||||||
for (int i = 0; i < modsecurity::Phases::NUMBER_OF_PHASES; i++) {
|
for (int i = 0; i < modsecurity::Phases::NUMBER_OF_PHASES; i++) {
|
||||||
RuleMarker *r = new RuleMarker(marker, std::unique_ptr<std::string>(new std::string(*fileName)), lineNumber);
|
RuleMarker *r = new RuleMarker(marker, std::unique_ptr<std::string>(new std::string(*fileName)), lineNumber);
|
||||||
|
@ -60,7 +60,7 @@ class Driver : public RulesSetProperties {
|
|||||||
|
|
||||||
int addSecRule(std::unique_ptr<RuleWithActions> rule);
|
int addSecRule(std::unique_ptr<RuleWithActions> rule);
|
||||||
int addSecAction(std::unique_ptr<RuleWithActions> rule);
|
int addSecAction(std::unique_ptr<RuleWithActions> rule);
|
||||||
int addSecMarker(std::string marker, std::unique_ptr<std::string> fileName, int lineNumber);
|
int addSecMarker(const std::string& marker, std::unique_ptr<std::string> fileName, int lineNumber);
|
||||||
int addSecRuleScript(std::unique_ptr<RuleScript> rule);
|
int addSecRuleScript(std::unique_ptr<RuleScript> rule);
|
||||||
|
|
||||||
bool scan_begin();
|
bool scan_begin();
|
||||||
|
@ -60,7 +60,6 @@ ctunullpointer:src/rule_with_operator.cc:135
|
|||||||
ctunullpointer:src/rule_with_operator.cc:95
|
ctunullpointer:src/rule_with_operator.cc:95
|
||||||
passedByValue:src/variables/global.h:109
|
passedByValue:src/variables/global.h:109
|
||||||
passedByValue:src/variables/global.h:110
|
passedByValue:src/variables/global.h:110
|
||||||
passedByValue:src/parser/driver.cc:46
|
|
||||||
passedByValue:test/common/modsecurity_test.cc:49
|
passedByValue:test/common/modsecurity_test.cc:49
|
||||||
passedByValue:test/common/modsecurity_test.cc:98
|
passedByValue:test/common/modsecurity_test.cc:98
|
||||||
unreadVariable:src/rule_with_operator.cc:219
|
unreadVariable:src/rule_with_operator.cc:219
|
||||||
|
Loading…
x
Reference in New Issue
Block a user