Copilot commented on code in PR #13583:
URL: https://github.com/apache/trafficserver/pull/13583#discussion_r3919267171


##########
include/tsutil/Metrics.h:
##########
@@ -35,8 +35,6 @@
 #include <variant>
 #include <optional>

Review Comment:
   `Metrics.h` uses `std::numeric_limits` for `NOT_FOUND` but doesn't include 
`<limits>` anymore (likely because the removed `swoc/MemSpan.h` previously 
provided it transitively). This makes the header non-self-contained and can 
fail to compile depending on include order / standard library implementation.



##########
src/tsutil/Metrics.cc:
##########
@@ -58,12 +58,16 @@ Metrics::Storage::addBlob() // The mutex must be held 
before calling this!
 {
   auto blob = std::make_unique<Metrics::NamesAndAtomics>();
 
+  auto const [cur_blob, cur_off] = 
_splitID(static_cast<IdType>(_next_free.load(std::memory_order_relaxed)));

Review Comment:
   `cur_off` is unused in `Storage::addBlob()`. With common `-Werror` 
configurations this can break the build; extract only the blob index (or 
explicitly mark the offset unused).



-- 
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]

Reply via email to