From 7a9c0ab15fcb315b8976f3f1c4476e79c11b2e51 Mon Sep 17 00:00:00 2001 From: Eduardo Arias Date: Sun, 28 Apr 2024 14:36:18 -0300 Subject: [PATCH] Removed unused suppresion and avoid copy of logPath --- src/audit_log/writer/parallel.cc | 2 +- test/cppcheck_suppressions.txt | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/audit_log/writer/parallel.cc b/src/audit_log/writer/parallel.cc index 0a9777bf..e42d7871 100644 --- a/src/audit_log/writer/parallel.cc +++ b/src/audit_log/writer/parallel.cc @@ -118,7 +118,7 @@ bool Parallel::write(Transaction *transaction, int parts, std::string *error) { log = transaction->toOldAuditLogFormat(parts, "-" + boundary + "--"); } - std::string logPath = m_audit->m_storage_dir; + const auto &logPath = m_audit->m_storage_dir; fileName = logPath + fileName + "-" + *transaction->m_id.get(); if (logPath.empty()) { diff --git a/test/cppcheck_suppressions.txt b/test/cppcheck_suppressions.txt index be29218f..a1004873 100644 --- a/test/cppcheck_suppressions.txt +++ b/test/cppcheck_suppressions.txt @@ -33,7 +33,6 @@ shiftNegative:src/utils/msc_tree.cc useInitializationList:src/utils/shared_files.h:87 duplicateBranch:src/audit_log/audit_log.cc:226 unreadVariable:src/request_body_processor/multipart.cc:435 -stlcstrParam:src/audit_log/writer/parallel.cc:145 syntaxError:src/transaction.cc:62 noConstructor:src/variables/variable.h:152 rethrowNoCurrentException:headers/modsecurity/transaction.h:313