We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent eaafe69 commit ad7c3ffCopy full SHA for ad7c3ff
src/perf_counters.cc
@@ -39,7 +39,8 @@ size_t PerfCounterValues::Read(const std::vector<int>& leaders) {
39
auto read_bytes = ::read(lead, ptr, size);
40
if (read_bytes >= ssize_t(sizeof(uint64_t))) {
41
// Actual data bytes are all bytes minus initial padding
42
- std::size_t data_bytes = read_bytes - sizeof(uint64_t);
+ std::size_t data_bytes =
43
+ static_cast<std::size_t>(read_bytes) - sizeof(uint64_t);
44
// This should be very cheap since it's in hot cache
45
std::memmove(ptr, ptr + sizeof(uint64_t), data_bytes);
46
// Increment our counters
0 commit comments