File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
include/libcyphal/transport/udp Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -168,10 +168,11 @@ class UdpardMemory final : public ScatteredBuffer::IStorage
168168 {
169169 CETL_DEBUG_ASSERT (nullptr != frag->view .data , " " );
170170 // Next nolint-s are unavoidable: we need offset from the beginning of the buffer.
171- // No Sonar `cpp:S5356` b/c we integrate here with libcanard raw C buffers.
171+ // No Sonar `cpp:S5356` & `cpp:S5357` b/c we integrate here with libcanard raw C buffers.
172172 // NOLINTNEXTLINE(cppcoreguidelines-pro-bounds-pointer-arithmetic)
173- const PayloadFragment frag_span{static_cast <const cetl::byte*>(frag->view .data ) +
174- view_offset, // NOSONAR cpp:S5356
173+ const auto * const offset_data =
174+ static_cast <const cetl::byte*>(frag->view .data ) + view_offset; // NOSONAR cpp:S5356 cpp:S5357
175+ const PayloadFragment frag_span{offset_data,
175176 std::min (frag->view .size - view_offset, length_bytes - dst_offset)};
176177 CETL_DEBUG_ASSERT (frag_span.size () <= (frag->view .size - view_offset), " " );
177178
You can’t perform that action at this time.
0 commit comments