bryancall opened a new pull request, #13550: URL: https://github.com/apache/trafficserver/pull/13550
Part 1 of 3 splitting a Coverity Scan cleanup into independently reviewable pieces. This one is deliberately the boring part: **no behavior change anywhere**. ### What this does - Replaces a copy with `std::move` where the source is never used again (42 sites). - Binds `const auto &` / `auto const &` instead of copying where a loop variable or local only reads the referent (7 sites). - Adds `<utility>` to four files that name `std::move` without including it directly. ### How it was checked Every move source was traced to the end of its scope to confirm it is not read after the move. The three `enable_inbound_connection_tracking(std::move(conn_track_group))` sites are worth a second look if you want a spot check: `conn_track_group` is declared *inside* each accept loop body, so no iteration inherits a moved-from group. A shared declaration there would have silently disabled inbound connection tracking after the first connection. Every reference conversion was checked to make sure it binds to something that outlives the use, not to a temporary. ### Reports deliberately not acted on Coverity flags five `auto` copies in the next-hop YAML parsers (`NextHopSelectionStrategy.cc`, `NextHopConsistentHash.cc`). Those are **false positives** and are left alone: the node accessors return by value, so `const auto &x = n["scheme"].Scalar()` binds a reference into a temporary that dies at the end of the statement. GCC's `-Wdangling-reference` confirms it. `ConfigContext` parameters reported as oversized are also left alone. They are by value by design, because the reload handler signature requires it and the handlers mutate the context. ### Verification Clean build with no new warnings and the full unit test suite passing (134/134) on Fedora, GCC 16.1.1. Every modified file is compiled, including the `uri_signing` and `stek_share` plugins, which need cjose and nuraft present. The two `access_control` changes sit behind `#ifdef ACCESS_CONTROL_LOG_SECRETS` and so are not covered by that build. Draft while CI runs. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
