Skip to content

Commit

Permalink
Avoid a maybe-uninitialized warning (#4342)
Browse files Browse the repository at this point in the history
Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>
  • Loading branch information
Mario-DL authored Feb 9, 2024
1 parent d891ffc commit 232f678
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/unittest/rtps/DataSharing/SHMSegmentTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ TEST(SHMSegmentTests, Writer)
std::shared_ptr<WriterPool> payload_pool(new WriterPool(history_attr.payloadMaxSize,
history_attr.maximumReservedCaches));

RTPSWriter* writer;
RTPSWriter* writer = nullptr;
EXPECT_NO_THROW(writer = RTPSDomain::createRTPSWriter(participant, writer_attr, payload_pool, history));
// RTPSWriter creation failed, as expected.
EXPECT_EQ(writer, nullptr);
Expand Down

0 comments on commit 232f678

Please sign in to comment.