diff --git a/src/parser/driver.cc b/src/parser/driver.cc index ec1b3e3b..a6a9755c 100644 --- a/src/parser/driver.cc +++ b/src/parser/driver.cc @@ -43,7 +43,7 @@ Driver::~Driver() { } -int Driver::addSecMarker(std::string marker, std::unique_ptr fileName, int lineNumber) { +int Driver::addSecMarker(const std::string& marker, std::unique_ptr fileName, int lineNumber) { // FIXME: we might move this to the parser. for (int i = 0; i < modsecurity::Phases::NUMBER_OF_PHASES; i++) { RuleMarker *r = new RuleMarker(marker, std::unique_ptr(new std::string(*fileName)), lineNumber); diff --git a/src/parser/driver.h b/src/parser/driver.h index e973dc8e..20e7ef3c 100644 --- a/src/parser/driver.h +++ b/src/parser/driver.h @@ -60,7 +60,7 @@ class Driver : public RulesSetProperties { int addSecRule(std::unique_ptr rule); int addSecAction(std::unique_ptr rule); - int addSecMarker(std::string marker, std::unique_ptr fileName, int lineNumber); + int addSecMarker(const std::string& marker, std::unique_ptr fileName, int lineNumber); int addSecRuleScript(std::unique_ptr rule); bool scan_begin(); diff --git a/test/cppcheck_suppressions.txt b/test/cppcheck_suppressions.txt index 8989958c..2a6c7aef 100644 --- a/test/cppcheck_suppressions.txt +++ b/test/cppcheck_suppressions.txt @@ -60,7 +60,6 @@ ctunullpointer:src/rule_with_operator.cc:135 ctunullpointer:src/rule_with_operator.cc:95 passedByValue:src/variables/global.h:109 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:98 unreadVariable:src/rule_with_operator.cc:219