This is an automated email from the ASF dual-hosted git repository.

JosiahWI pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
     new 62016861cf Fix some copy instead of move Coverity CIDs (#13470)
62016861cf is described below

commit 62016861cf314d6926a8c1375f726e53d7e35761
Author: JosiahWI <[email protected]>
AuthorDate: Mon Aug 3 18:19:22 2026 -0500

    Fix some copy instead of move Coverity CIDs (#13470)
    
    * Fix some copy instead of move Coverity CIDs
    
    CIDs fixed in this patch:
    
    1664317
    1664316
    1664286
    1664284
    1663965
    1660036
    1658876
    1658839
    1658837
    1658799
    1654583
    1654213
    1654211
    1654210
    1654207
    1654206
    1645817
    1645816
    1645814
    1645813
    1645811
    1645809
    1645808
    1645806
    1645804
    1645802
    1645801
    1645799
    1645798
    1645796
    1645795
    1644303
    1644300
    1644293
    1644255
    1644242
    1644227
    1644207
---
 include/iocore/net/ConnectionTracker.h                |  3 ++-
 include/mgmt/config/ConfigReloadTrace.h               |  5 +++--
 plugins/experimental/filter_body/filter_body.cc       |  5 +++--
 plugins/experimental/jax_fingerprint/ja4/test.cc      |  3 ++-
 plugins/experimental/jax_fingerprint/ja4h/test.cc     |  5 +++--
 plugins/experimental/txn_box/plugin/src/Comparison.cc |  3 ++-
 plugins/experimental/txn_box/plugin/src/Config.cc     |  3 ++-
 plugins/experimental/txn_box/plugin/src/ip_space.cc   |  2 +-
 plugins/prefetch/path.cc                              |  3 ++-
 plugins/stats_over_http/stats_over_http.cc            |  3 ++-
 plugins/webp_transform/ImageTransform.cc              |  4 ++--
 src/api/InkAPI.cc                                     |  6 ++++--
 src/config/ssl_multicert.cc                           |  5 +++--
 src/config/unit_tests/test_ssl_multicert.cc           | 11 ++++++-----
 src/iocore/cache/CacheDir.cc                          |  3 ++-
 src/iocore/net/unit_tests/test_SSLSNIConfig.cc        |  3 ++-
 src/mgmt/config/ConfigReloadTrace.cc                  |  5 +++--
 src/mgmt/config/ReloadCoordinator.cc                  |  6 +++---
 src/mgmt/rpc/handlers/config/Configuration.cc         |  3 ++-
 src/proxy/Plugin.cc                                   |  3 ++-
 src/proxy/logging/LogField.cc                         |  4 ++--
 src/records/unit_tests/test_ReloadDirectives.cc       |  2 +-
 src/traffic_cache_tool/CacheDefs.h                    |  3 ++-
 src/traffic_ctl/CtrlCommands.cc                       |  7 ++++---
 src/traffic_ctl/jsonrpc/ctrl_yaml_codecs.h            |  4 +++-
 25 files changed, 63 insertions(+), 41 deletions(-)

diff --git a/include/iocore/net/ConnectionTracker.h 
b/include/iocore/net/ConnectionTracker.h
index d41d9ad86f..360fda7b64 100644
--- a/include/iocore/net/ConnectionTracker.h
+++ b/include/iocore/net/ConnectionTracker.h
@@ -32,6 +32,7 @@
 #include <mutex>
 #include <sstream>
 #include <tuple>
+#include <utility>
 #include "records/RecCore.h"
 #include "tscore/ink_platform.h"
 #include "tscore/ink_config.h"
@@ -429,7 +430,7 @@ ConnectionTracker::Group::metric_name(const Key &key, 
std::string_view fqdn, std
   default:
     Warning("Invalid matching type to add to per_server.connections metrics");
   }
-  return metric_prefix.empty() ? metric_name : metric_prefix + "." + 
metric_name;
+  return metric_prefix.empty() ? std::move(metric_name) : metric_prefix + "." 
+ metric_name;
 }
 
 inline bool
diff --git a/include/mgmt/config/ConfigReloadTrace.h 
b/include/mgmt/config/ConfigReloadTrace.h
index 1db523e8a7..b325c707b1 100644
--- a/include/mgmt/config/ConfigReloadTrace.h
+++ b/include/mgmt/config/ConfigReloadTrace.h
@@ -25,11 +25,12 @@
 
 #include <atomic>
 #include <chrono>
+#include <iostream>
 #include <string_view>
 #include <string>
 #include <mutex>
 #include <shared_mutex>
-#include <iostream>
+#include <utility>
 
 #include <swoc/Errata.h>
 #include <tscore/ink_platform.h>
@@ -207,7 +208,7 @@ public:
   using self_type    = ConfigReloadTask;
   ConfigReloadTask() = default;
   ConfigReloadTask(std::string_view token, std::string_view description, bool 
main_task, ConfigReloadTaskPtr parent)
-    : _info(State::CREATED, token, description, main_task), _parent{parent}
+    : _info(State::CREATED, token, description, main_task), 
_parent{std::move(parent)}
   {
     if (_info.main_task) {
       _info.state = State::IN_PROGRESS;
diff --git a/plugins/experimental/filter_body/filter_body.cc 
b/plugins/experimental/filter_body/filter_body.cc
index ca7471c71b..224c78fec0 100644
--- a/plugins/experimental/filter_body/filter_body.cc
+++ b/plugins/experimental/filter_body/filter_body.cc
@@ -27,6 +27,7 @@
 
 #include <cstring>
 #include <string>
+#include <utility>
 #include <vector>
 #include <algorithm>
 #include <cctype>
@@ -901,7 +902,7 @@ parse_config(const char *filename)
               AddHeader add_hdr;
               add_hdr.name  = hdr.first.as<std::string>();
               add_hdr.value = hdr.second.as<std::string>();
-              rule.add_headers.push_back(add_hdr);
+              rule.add_headers.push_back(std::move(add_hdr));
             }
           }
         }
@@ -953,7 +954,7 @@ parse_config(const char *filename)
               cond.patterns.push_back(pattern_node.as<std::string>());
             }
           }
-          rule.headers.push_back(cond);
+          rule.headers.push_back(std::move(cond));
         }
       }
 
diff --git a/plugins/experimental/jax_fingerprint/ja4/test.cc 
b/plugins/experimental/jax_fingerprint/ja4/test.cc
index 35f8e79b53..16456d19e7 100644
--- a/plugins/experimental/jax_fingerprint/ja4/test.cc
+++ b/plugins/experimental/jax_fingerprint/ja4/test.cc
@@ -34,6 +34,7 @@
 #include <string>
 #include <string_view>
 #include <unordered_map>
+#include <utility>
 #include <vector>
 
 namespace
@@ -127,7 +128,7 @@ public:
   void
   set_first_alpn(std::string first_alpn)
   {
-    this->_first_alpn = first_alpn;
+    this->_first_alpn = std::move(first_alpn);
   }
   void
   add_cipher(std::uint16_t cipher)
diff --git a/plugins/experimental/jax_fingerprint/ja4h/test.cc 
b/plugins/experimental/jax_fingerprint/ja4h/test.cc
index d2f84b1a8b..3d1abb5022 100644
--- a/plugins/experimental/jax_fingerprint/ja4h/test.cc
+++ b/plugins/experimental/jax_fingerprint/ja4h/test.cc
@@ -27,6 +27,7 @@
 
 #include <string>
 #include <map>
+#include <utility>
 
 namespace
 {
@@ -89,7 +90,7 @@ public:
   void
   set_method(std::string method)
   {
-    this->_method = method;
+    this->_method = std::move(method);
   }
   void
   set_version(int version)
@@ -99,7 +100,7 @@ public:
   void
   set_fields(std::map<std::string, std::string> fields)
   {
-    this->_fields = fields;
+    this->_fields = std::move(fields);
   }
 
 private:
diff --git a/plugins/experimental/txn_box/plugin/src/Comparison.cc 
b/plugins/experimental/txn_box/plugin/src/Comparison.cc
index 85013dd98a..20d85d042e 100644
--- a/plugins/experimental/txn_box/plugin/src/Comparison.cc
+++ b/plugins/experimental/txn_box/plugin/src/Comparison.cc
@@ -21,6 +21,7 @@
 */
 
 #include <string>
+#include <utility>
 #include <algorithm>
 
 #include <swoc/bwf_base.h>
@@ -1391,7 +1392,7 @@ ComboComparison::load(Config &cfg, YAML::Node const 
&cmp_node, TextView const &k
   } else if (value_node.IsSequence()) {
     cmps.reserve(cmp_node.size());
     for (auto child : value_node) {
-      auto errata = self_type::load_case(cfg, cmps, child);
+      auto errata = self_type::load_case(cfg, cmps, std::move(child));
       if (!errata.is_ok()) {
         errata.note("While parsing {} comparison at {}.", key, 
cmp_node.Mark());
         return errata;
diff --git a/plugins/experimental/txn_box/plugin/src/Config.cc 
b/plugins/experimental/txn_box/plugin/src/Config.cc
index 3e5f9dca02..f90b1ee929 100644
--- a/plugins/experimental/txn_box/plugin/src/Config.cc
+++ b/plugins/experimental/txn_box/plugin/src/Config.cc
@@ -23,6 +23,7 @@
 #include <string>
 #include <map>
 #include <numeric>
+#include <utility>
 #include <glob.h>
 
 #include <swoc/TextView.h>
@@ -649,7 +650,7 @@ Config::parse_yaml(YAML::Node root, TextView path)
 
   if (root.IsSequence()) {
     for (auto child : root) {
-      errata.note((this->*drtv_loader)(child));
+      errata.note((this->*drtv_loader)(std::move(child)));
     }
     if (!errata.is_ok()) {
       errata.note(R"(While loading list of top level directives for "{}" at 
{}.)", path, root.Mark());
diff --git a/plugins/experimental/txn_box/plugin/src/ip_space.cc 
b/plugins/experimental/txn_box/plugin/src/ip_space.cc
index 6b472e6356..bca213af70 100644
--- a/plugins/experimental/txn_box/plugin/src/ip_space.cc
+++ b/plugins/experimental/txn_box/plugin/src/ip_space.cc
@@ -698,7 +698,7 @@ Do_ip_space_define::load(Config &cfg, CfgStaticData const 
*, YAML::Node drtv_nod
       }
     } else if (cols_node.IsSequence()) {
       for (auto child : cols_node) {
-        auto errata = self->define_column(cfg, child);
+        auto errata = self->define_column(cfg, std::move(child));
         if (!errata.is_ok()) {
           errata.note(R"(While parsing "{}" key at {}.)", COLUMNS_TAG, 
cols_node.Mark());
           return errata;
diff --git a/plugins/prefetch/path.cc b/plugins/prefetch/path.cc
index a89e16ce52..7f500bab3c 100644
--- a/plugins/prefetch/path.cc
+++ b/plugins/prefetch/path.cc
@@ -24,6 +24,7 @@
 #include "path.h"
 
 #include <cctype>
+#include <utility>
 
 namespace
 {
@@ -181,7 +182,7 @@ makeSafeRelativeFetchPath(const String &currentPath, const 
String &relativePath,
     return false;
   }
 
-  fetchPath.path = normalizedCandidatePath;
+  fetchPath.path = std::move(normalizedCandidatePath);
   if (String::npos != queryStart) {
     fetchPath.hasQuery = true;
     fetchPath.query    = relativePath.substr(queryStart + 1);
diff --git a/plugins/stats_over_http/stats_over_http.cc 
b/plugins/stats_over_http/stats_over_http.cc
index 9afcd61f78..954e894ffa 100644
--- a/plugins/stats_over_http/stats_over_http.cc
+++ b/plugins/stats_over_http/stats_over_http.cc
@@ -40,6 +40,7 @@
 #include <sys/stat.h>
 #include <ts/ts.h>
 #include <unordered_map>
+#include <utility>
 #include <vector>
 #include <unistd.h>
 #include <zlib.h>
@@ -744,7 +745,7 @@ parse_metric_v2(std::string_view name)
     }
   }
 
-  return {base_name, labels};
+  return {std::move(base_name), std::move(labels)};
 }
 
 static bool
diff --git a/plugins/webp_transform/ImageTransform.cc 
b/plugins/webp_transform/ImageTransform.cc
index e4ebc7f4d7..530503748c 100644
--- a/plugins/webp_transform/ImageTransform.cc
+++ b/plugins/webp_transform/ImageTransform.cc
@@ -434,13 +434,13 @@ public:
         if (!content_length_usable) {
           
TSHttpTxnServerRespNoStoreSet(static_cast<TSHttpTxn>(transaction.getAtsHandle()),
 1);
         }
-        transaction.addPlugin(new ImageTransform(transaction, ctype, 
input_image_type, ImageEncoding::webp));
+        transaction.addPlugin(new ImageTransform(transaction, 
std::move(ctype), input_image_type, ImageEncoding::webp));
       } else if (webp_supported == false && transaction_convert_to_jpeg == 
true) {
         Dbg(webp_dbg_ctl, "Content type is webp. Converting to jpeg");
         if (!content_length_usable) {
           
TSHttpTxnServerRespNoStoreSet(static_cast<TSHttpTxn>(transaction.getAtsHandle()),
 1);
         }
-        transaction.addPlugin(new ImageTransform(transaction, ctype, 
input_image_type, ImageEncoding::jpeg));
+        transaction.addPlugin(new ImageTransform(transaction, 
std::move(ctype), input_image_type, ImageEncoding::jpeg));
       } else {
         Dbg(webp_dbg_ctl, "Nothing to convert");
       }
diff --git a/src/api/InkAPI.cc b/src/api/InkAPI.cc
index 6d085befbb..8858e90a4c 100644
--- a/src/api/InkAPI.cc
+++ b/src/api/InkAPI.cc
@@ -22,11 +22,12 @@
  */
 
 #include <atomic>
+#include <charconv>
 #include <tuple>
 #include <unordered_map>
 #include <string_view>
 #include <string>
-#include <charconv>
+#include <utility>
 
 #include "iocore/net/NetVConnection.h"
 #include "iocore/net/NetHandler.h"
@@ -9079,7 +9080,8 @@ TSLogFieldRegister(std::string_view name, 
std::string_view symbol, TSLogType typ
 
   LogField *field = new LogField(
     name.data(), symbol.data(), static_cast<LogField::Type>(type),
-    [marshal_cb](void *sm, char *buf) -> int { return 
marshal_cb(reinterpret_cast<TSHttpTxn>(sm), buf); }, unmarshal_cb);
+    [marshal_cb = std::move(marshal_cb)](void *sm, char *buf) -> int { return 
marshal_cb(reinterpret_cast<TSHttpTxn>(sm), buf); },
+    unmarshal_cb);
   Log::global_field_list.add(field, false);
   Log::field_symbol_hash.emplace(symbol.data(), field);
 
diff --git a/src/config/ssl_multicert.cc b/src/config/ssl_multicert.cc
index 5dfdf486e1..873068df11 100644
--- a/src/config/ssl_multicert.cc
+++ b/src/config/ssl_multicert.cc
@@ -27,6 +27,7 @@
 #include <cctype>
 #include <exception>
 #include <set>
+#include <utility>
 
 #include <yaml-cpp/yaml.h>
 
@@ -281,7 +282,7 @@ SSLMultiCertParser::parse_yaml(std::string_view content)
     return {result, swoc::Errata("YAML parse error: {}", ex.what())};
   }
 
-  return {result, std::move(errata)};
+  return {std::move(result), std::move(errata)};
 }
 
 ConfigResult<SSLMultiCertConfig>
@@ -337,7 +338,7 @@ SSLMultiCertParser::parse_legacy(std::string_view content)
     result.push_back(std::move(entry));
   }
 
-  return {result, std::move(errata)};
+  return {std::move(result), std::move(errata)};
 }
 
 std::string
diff --git a/src/config/unit_tests/test_ssl_multicert.cc 
b/src/config/unit_tests/test_ssl_multicert.cc
index 7baae9563b..9cf15a4039 100644
--- a/src/config/unit_tests/test_ssl_multicert.cc
+++ b/src/config/unit_tests/test_ssl_multicert.cc
@@ -25,6 +25,7 @@
 
 #include <filesystem>
 #include <fstream>
+#include <utility>
 
 #include <catch2/catch_test_macros.hpp>
 #include <catch2/generators/catch_generators.hpp>
@@ -239,13 +240,13 @@ TEST_CASE("SSLMultiCertMarshaller produces valid YAML", 
"[ssl_multicert][marshal
   entry1.ssl_cert_name = "server.pem";
   entry1.dest_ip       = "*";
   entry1.ssl_key_name  = "server.key";
-  config.push_back(entry1);
+  config.push_back(std::move(entry1));
 
   SSLMultiCertEntry entry2;
   entry2.ssl_cert_name      = "another.pem";
   entry2.dest_ip            = "[::1]:8443";
   entry2.ssl_ticket_enabled = 1;
-  config.push_back(entry2);
+  config.push_back(std::move(entry2));
 
   SSLMultiCertMarshaller marshaller;
   std::string            yaml = marshaller.to_yaml(config);
@@ -276,14 +277,14 @@ TEST_CASE("SSLMultiCertMarshaller produces valid JSON", 
"[ssl_multicert][marshal
   SSLMultiCertEntry entry1;
   entry1.ssl_cert_name = "server.pem";
   entry1.dest_ip       = "*";
-  config.push_back(entry1);
+  config.push_back(std::move(entry1));
 
   SSLMultiCertEntry entry2;
   entry2.ssl_cert_name      = "another.pem";
   entry2.dest_ip            = "[::1]:8443";
   entry2.ssl_ticket_enabled = 1;
   entry2.ssl_ticket_number  = 5;
-  config.push_back(entry2);
+  config.push_back(std::move(entry2));
 
   SSLMultiCertMarshaller marshaller;
   std::string            json = marshaller.to_json(config);
@@ -305,7 +306,7 @@ TEST_CASE("SSLMultiCertMarshaller handles special 
characters", "[ssl_multicert][
   entry.ssl_cert_name  = "server.pem";
   entry.dest_ip        = "*";
   entry.ssl_key_dialog = "exec:/path/to/script \"with quotes\"";
-  config.push_back(entry);
+  config.push_back(std::move(entry));
 
   SSLMultiCertMarshaller marshaller;
 
diff --git a/src/iocore/cache/CacheDir.cc b/src/iocore/cache/CacheDir.cc
index 99e9fba47b..7368e57c4e 100644
--- a/src/iocore/cache/CacheDir.cc
+++ b/src/iocore/cache/CacheDir.cc
@@ -35,6 +35,7 @@
 
 #include <thread>
 #include <unordered_map>
+#include <utility>
 
 #ifdef LOOP_CHECK_MODE
 #define DIR_LOOP_THRESHOLD 1000
@@ -932,7 +933,7 @@ sync_cache_dir_on_shutdown()
   for (auto &[disk, indices] : drive_stripe_map) {
     Dbg(dbg_ctl_cache_dir_sync, "Disk %s: syncing %zu stripe(s)", disk->path, 
indices.size());
     auto stripe_indices = indices;
-    threads.emplace_back([stripe_indices]() {
+    threads.emplace_back([stripe_indices = std::move(stripe_indices)]() {
       // Use a thread_local variable to give each OS thread a unique EThread* 
sentinel instead of 0xdeadbeef.
       thread_local char thread_sentinel;
       EThread          *t = reinterpret_cast<EThread *>(&thread_sentinel);
diff --git a/src/iocore/net/unit_tests/test_SSLSNIConfig.cc 
b/src/iocore/net/unit_tests/test_SSLSNIConfig.cc
index b9aa20f266..066edfff08 100644
--- a/src/iocore/net/unit_tests/test_SSLSNIConfig.cc
+++ b/src/iocore/net/unit_tests/test_SSLSNIConfig.cc
@@ -34,6 +34,7 @@
 #include <catch2/catch_test_macros.hpp>
 
 #include <cstring>
+#include <utility>
 #include "tscore/ink_inet.h"
 
 TEST_CASE("Test SSLSNIConfig")
@@ -266,7 +267,7 @@ TEST_CASE("SNIConfig handles high-bit bytes while 
normalizing server names")
   item.inbound_port_ranges.emplace_back(1, ts::MAX_PORT_VALUE);
 
   SNIConfigParams params;
-  params.yaml_sni.items.push_back(item);
+  params.yaml_sni.items.push_back(std::move(item));
   REQUIRE(params.load_sni_config());
 
   std::string servername{"hIGH"};
diff --git a/src/mgmt/config/ConfigReloadTrace.cc 
b/src/mgmt/config/ConfigReloadTrace.cc
index 8d3285c8a1..aae0b0f019 100644
--- a/src/mgmt/config/ConfigReloadTrace.cc
+++ b/src/mgmt/config/ConfigReloadTrace.cc
@@ -27,6 +27,7 @@
 #include "tsutil/ts_diag_levels.h"
 
 #include <algorithm>
+#include <utility>
 #include "tsutil/Metrics.h"
 #include "tsutil/ts_time_parser.h"
 
@@ -85,7 +86,7 @@ ConfigReloadTask::add_child(std::string_view description, 
std::string_view filen
   // Read token directly - can't call get_token() as it would deadlock (tries 
to acquire shared_lock on same mutex)
   auto trace = std::make_shared<ConfigReloadTask>(_info.token, description, 
false, shared_from_this());
   _info.sub_tasks.push_back(trace);
-  return ConfigContext{trace, description, filename};
+  return ConfigContext{std::move(trace), description, filename};
 }
 
 ConfigReloadTask &
@@ -469,7 +470,7 @@ ConfigReloadProgress::check_progress(int /* etype */, void 
* /* data */)
 }
 
 ConfigReloadProgress::ConfigReloadProgress(ConfigReloadTaskPtr reload)
-  : Continuation(new_ProxyMutex()), _reload{reload}, 
_every{get_configured_check_interval()}
+  : Continuation(new_ProxyMutex()), _reload{std::move(reload)}, 
_every{get_configured_check_interval()}
 {
   SET_HANDLER(&ConfigReloadProgress::check_progress);
 }
diff --git a/src/mgmt/config/ReloadCoordinator.cc 
b/src/mgmt/config/ReloadCoordinator.cc
index 202a7806af..6add40d8f0 100644
--- a/src/mgmt/config/ReloadCoordinator.cc
+++ b/src/mgmt/config/ReloadCoordinator.cc
@@ -126,7 +126,7 @@ ReloadCoordinator::reserve_subtask(std::string_view 
config_key)
 
   auto task = std::make_shared<ConfigReloadTask>(_current_task->get_token(), 
config_key, false, _current_task);
   task->set_config_key(config_key);
-  _current_task->add_sub_task(task);
+  _current_task->add_sub_task(std::move(task));
 
   Dbg(dbg_ctl, "Reserved subtask for config '%.*s'", 
static_cast<int>(config_key.size()), config_key.data());
 }
@@ -153,7 +153,7 @@ ReloadCoordinator::create_config_context(std::string_view 
config_key, std::strin
       if (existing->get_state() == ConfigReloadTask::State::CREATED) {
         // Activate the reserved subtask
         Dbg(dbg_ctl, "Activating reserved subtask for config '%.*s'", 
static_cast<int>(config_key.size()), config_key.data());
-        return ConfigContext{existing, description, filename};
+        return ConfigContext{std::move(existing), description, filename};
       }
       // Already handled — true duplicate
       Dbg(dbg_ctl, "Duplicate reload for config '%.*s' — subtask already 
exists, skipping", static_cast<int>(config_key.size()),
@@ -168,7 +168,7 @@ ReloadCoordinator::create_config_context(std::string_view 
config_key, std::strin
   task->set_config_key(config_key);
   _current_task->add_sub_task(task);
 
-  ConfigContext ctx{task, description, filename};
+  ConfigContext ctx{std::move(task), description, filename};
   return ctx;
 }
 
diff --git a/src/mgmt/rpc/handlers/config/Configuration.cc 
b/src/mgmt/rpc/handlers/config/Configuration.cc
index 9f901bbb62..d2b498641d 100644
--- a/src/mgmt/rpc/handlers/config/Configuration.cc
+++ b/src/mgmt/rpc/handlers/config/Configuration.cc
@@ -20,6 +20,7 @@
 #include <system_error>
 #include <string>
 #include <string_view>
+#include <utility>
 
 #include "records/RecCore.h"
 #include "../../../../records/P_RecCore.h"
@@ -308,7 +309,7 @@ reload_config(std::string_view const & /* id ATS_UNUSED */, 
YAML::Node const &pa
         continue;
       }
 
-      valid_configs.push_back({parent_key, key, it->second});
+      valid_configs.push_back({std::move(parent_key), std::move(key), 
it->second});
     }
 
     // If no valid configs, return early without creating a task
diff --git a/src/proxy/Plugin.cc b/src/proxy/Plugin.cc
index d6ebc46b48..16f51a3d4d 100644
--- a/src/proxy/Plugin.cc
+++ b/src/proxy/Plugin.cc
@@ -26,6 +26,7 @@
 #include <filesystem>
 #include <optional>
 #include <string_view>
+#include <utility>
 #include <vector>
 #include "tscore/ink_platform.h"
 #include "tscore/ink_file.h"
@@ -428,7 +429,7 @@ plugin_init(bool validateOnly)
 
     retVal = single_plugin_init(argc, argv, validateOnly);
 
-    s_plugin_load_summary.entries.push_back({plugin_name, -1, true, retVal, 
load_index});
+    s_plugin_load_summary.entries.push_back({std::move(plugin_name), -1, true, 
retVal, load_index});
 
     for (i = 0; i < argc; i++) {
       ats_free(vars[i]);
diff --git a/src/proxy/logging/LogField.cc b/src/proxy/logging/LogField.cc
index 485ef24033..431208e9c3 100644
--- a/src/proxy/logging/LogField.cc
+++ b/src/proxy/logging/LogField.cc
@@ -311,8 +311,8 @@ LogField::LogField(const char *name, const char *symbol, 
Type type, CustomMarsha
     m_time_field(false),
     m_alias_map(nullptr),
     m_set_func(nullptr),
-    m_custom_marshal_func(custom_marshal),
-    m_custom_unmarshal_func(custom_unmarshal)
+    m_custom_marshal_func(std::move(custom_marshal)),
+    m_custom_unmarshal_func(std::move(custom_unmarshal))
 {
   ink_assert(m_name != nullptr);
   ink_assert(m_symbol != nullptr);
diff --git a/src/records/unit_tests/test_ReloadDirectives.cc 
b/src/records/unit_tests/test_ReloadDirectives.cc
index 5b90b60708..9fe697eea5 100644
--- a/src/records/unit_tests/test_ReloadDirectives.cc
+++ b/src/records/unit_tests/test_ReloadDirectives.cc
@@ -187,7 +187,7 @@ TEST_CASE("ConfigContext: supplied_yaml on default context 
has no content", "[co
 TEST_CASE("ConfigContext: reload_directives round-trip via task", 
"[config][context][directive]")
 {
   auto          task = std::make_shared<ConfigReloadTask>("test-dir-1", 
"test", false, nullptr);
-  ConfigContext ctx(task, "test_handler");
+  ConfigContext ctx(std::move(task), "test_handler");
 
   YAML::Node directives;
   directives["id"]      = "foo";
diff --git a/src/traffic_cache_tool/CacheDefs.h 
b/src/traffic_cache_tool/CacheDefs.h
index 1d9a8c6464..5f77834936 100644
--- a/src/traffic_cache_tool/CacheDefs.h
+++ b/src/traffic_cache_tool/CacheDefs.h
@@ -26,6 +26,7 @@
 #include <netinet/in.h>
 #include <iostream>
 #include <list>
+#include <utility>
 
 #include "swoc/swoc_file.h"
 #include "swoc/Scalar.h"
@@ -290,7 +291,7 @@ struct url_matcher {
       while (fileContent) {
         swoc::TextView line = fileContent.take_prefix_at('\n');
         std::string    reg_str(line.data(), line.size());
-        str_vec.push_back(reg_str);
+        str_vec.push_back(std::move(reg_str));
         count++;
       }
       patterns = (const char **)ats_malloc(count * sizeof(char *));
diff --git a/src/traffic_ctl/CtrlCommands.cc b/src/traffic_ctl/CtrlCommands.cc
index 1f64bd45db..8c5d51b4a4 100644
--- a/src/traffic_ctl/CtrlCommands.cc
+++ b/src/traffic_ctl/CtrlCommands.cc
@@ -22,12 +22,13 @@
 
 #include <algorithm>
 #include <cctype>
+#include <csignal>
 #include <fstream>
 #include <unordered_map>
 #include <chrono>
 #include <iomanip>
+#include <utility>
 #include <thread>
-#include <csignal>
 #include <unistd.h>
 
 #include <swoc/TextView.h>
@@ -306,7 +307,7 @@ ConfigCommand::config_status()
       {"error",   DL_Error  },
     };
 
-    std::string lowered{min_level};
+    std::string lowered{std::move(min_level)};
     std::transform(lowered.begin(), lowered.end(), lowered.begin(),
                    [](unsigned char c) { return 
static_cast<char>(std::tolower(c)); });
 
@@ -942,7 +943,7 @@ HostDBCommand::status_get()
     };
   }
 
-  HostDBGetStatusRequest request{params};
+  HostDBGetStatusRequest request{std::move(params)};
 
   auto response = invoke_rpc(request);
 
diff --git a/src/traffic_ctl/jsonrpc/ctrl_yaml_codecs.h 
b/src/traffic_ctl/jsonrpc/ctrl_yaml_codecs.h
index 3f9ff1016f..0eff4952b5 100644
--- a/src/traffic_ctl/jsonrpc/ctrl_yaml_codecs.h
+++ b/src/traffic_ctl/jsonrpc/ctrl_yaml_codecs.h
@@ -26,6 +26,8 @@
 
 #include "CtrlRPCRequests.h"
 
+#include <utility>
+
 // traffic_ctl jsonrpc request/response YAML codec implementation.
 
 namespace YAML
@@ -107,7 +109,7 @@ template <> struct convert<ConfigReloadResponse> {
           ConfigReloadResponse::LogEntry entry;
           entry.level = 
static_cast<DiagsLevel>(log["level"].as<int>(DL_Undefined));
           entry.text  = log["text"].as<std::string>();
-          info.logs.push_back(entry);
+          info.logs.push_back(std::move(entry));
         } else {
           info.logs.push_back({DL_Undefined, log.as<std::string>()});
         }

Reply via email to