diff --git a/src/variables/global.h b/src/variables/global.h index 8a040c29..bc591402 100644 --- a/src/variables/global.h +++ b/src/variables/global.h @@ -106,8 +106,8 @@ class Global_DynamicElement : public Variable { t->m_rules->m_secWebAppId.m_value); } - static void storeOrUpdateFirst(Transaction *t, std::string var, - std::string value) { + static void storeOrUpdateFirst(Transaction *t, const std::string &var, + const std::string &value) { t->m_collections.m_global_collection->storeOrUpdateFirst( var, t->m_collections.m_global_collection_key, t->m_rules->m_secWebAppId.m_value, diff --git a/test/cppcheck_suppressions.txt b/test/cppcheck_suppressions.txt index e1e398d4..356bc119 100644 --- a/test/cppcheck_suppressions.txt +++ b/test/cppcheck_suppressions.txt @@ -58,8 +58,6 @@ rethrowNoCurrentException:src/rule_with_actions.cc:127 ctunullpointer:src/rule_with_actions.cc:244 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:test/common/modsecurity_test.cc:49 passedByValue:test/common/modsecurity_test.cc:98 unreadVariable:src/rule_with_operator.cc:219