diff --git a/examples/reading_logs_via_rule_message/reading_logs_via_rule_message.h b/examples/reading_logs_via_rule_message/reading_logs_via_rule_message.h index 3fb6ef1ebe..9d80d9b1d2 100644 --- a/examples/reading_logs_via_rule_message/reading_logs_via_rule_message.h +++ b/examples/reading_logs_via_rule_message/reading_logs_via_rule_message.h @@ -124,7 +124,7 @@ class ReadingLogsViaRuleMessage { m_rules(rules) { } - int process() { + int process() const { pthread_t threads[NUM_THREADS]; int i; struct data_ms dms; diff --git a/src/rule_with_operator.cc b/src/rule_with_operator.cc index d308443a47..4669fa4392 100644 --- a/src/rule_with_operator.cc +++ b/src/rule_with_operator.cc @@ -133,7 +133,7 @@ bool RuleWithOperator::executeOperatorAt(Transaction *trans, const std::string & void RuleWithOperator::getVariablesExceptions(Transaction *t, variables::Variables *exclusion, variables::Variables *addition) { - for (auto &a : t->m_rules->m_exceptions.m_variable_update_target_by_tag) { // cppcheck-suppress ctunullpointer + for (const auto &a : t->m_rules->m_exceptions.m_variable_update_target_by_tag) { // cppcheck-suppress ctunullpointer if (containsTag(*a.first.get(), t) == false) { continue; }