Skip to content

Commit

Permalink
(void) std::memmove #sonar
Browse files Browse the repository at this point in the history
  • Loading branch information
serges147 committed May 8, 2024
1 parent a7062bd commit e325967
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion include/libcyphal/transport/can/delegate.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ class TransportDelegate
const std::size_t bytes_to_copy = std::min(length_bytes, payload_size_ - offset_bytes);
// Next nolint is unavoidable: we need offset from the beginning of the buffer.
// NOLINTNEXTLINE(cppcoreguidelines-pro-bounds-pointer-arithmetic)
std::memmove(destination, static_cast<cetl::byte*>(buffer_) + offset_bytes, bytes_to_copy);
(void) std::memmove(destination, static_cast<cetl::byte*>(buffer_) + offset_bytes, bytes_to_copy);
return bytes_to_copy;
}

Expand Down
2 changes: 1 addition & 1 deletion include/libcyphal/transport/contiguous_payload.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class ContiguousPayload final
{
// Next nolint is unavoidable: we need offset from the beginning of the buffer.
// NOLINTNEXTLINE(cppcoreguidelines-pro-bounds-pointer-arithmetic)
std::memmove(&buffer[offset], frag.data(), frag.size());
(void) std::memmove(&buffer[offset], frag.data(), frag.size());
offset += frag.size();
}
}
Expand Down

0 comments on commit e325967

Please sign in to comment.