Skip to content

Commit

Permalink
Refs #21293: Windows warnings & eofs
Browse files Browse the repository at this point in the history
Signed-off-by: Mario Dominguez <[email protected]>
  • Loading branch information
Mario-DL committed Oct 3, 2024
1 parent 2574749 commit b14868d
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/cpp/rtps/reader/LocalReaderPointer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,4 @@ bool LocalReaderPointer::is_valid()

} // namespace rtps
} // namespace fastdds
} // namespace eprosima
} // namespace eprosima
2 changes: 1 addition & 1 deletion src/cpp/rtps/reader/LocalReaderPointer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,4 +117,4 @@ class LocalReaderPointer
} // namespace fastdds
} // namespace eprosima

#endif // FASTDDS_RTPS_WRITER__LOCALREADERPOINTER_HPP
#endif // FASTDDS_RTPS_WRITER__LOCALREADERPOINTER_HPP
6 changes: 3 additions & 3 deletions src/cpp/rtps/reader/LocalReaderView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,15 @@ void LocalReaderView::dereference()
}

void LocalReaderView::wait_for_references_and_set_status(
size_t references,
size_t n_references,
LocalReaderViewStatus new_status)
{
std::unique_lock<std::mutex> lock(mutex);
if (this->references.load() != references)
if (this->references.load() != n_references)
{
cv.wait(lock, [&]()
{
return this->references.load() == references;
return this->references.load() == n_references;
});
}
status = new_status;
Expand Down
2 changes: 1 addition & 1 deletion src/cpp/rtps/reader/LocalReaderView.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,4 +102,4 @@ class LocalReaderView
} /* namespace fastdds */
} /* namespace eprosima */

#endif // FASTDDS_RTPS_WRITER__LOCALREADERVIEW_HPP
#endif // FASTDDS_RTPS_WRITER__LOCALREADERVIEW_HPP
2 changes: 0 additions & 2 deletions src/cpp/rtps/writer/StatefulWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -443,8 +443,6 @@ bool StatefulWriter::intraprocess_heartbeat(
bool liveliness)
{
bool returned_value = false;

std::lock_guard<RecursiveTimedMutex> guardW(mp_mutex);
LocalReaderPointer local_reader_pt = reader_proxy->local_reader();

if (local_reader_pt.is_valid())
Expand Down
6 changes: 3 additions & 3 deletions test/blackbox/common/DDSBlackboxTestsBasic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -974,10 +974,10 @@ TEST(DDSBasic, successful_destruction_among_intraprocess_participants)
ASSERT_TRUE(reception_participants.back()->init_publisher(0u));
}

participant_1->wait_discovery(std::chrono::seconds::zero(), num_reception_participants, true);
participant_1->wait_discovery(std::chrono::seconds::zero(), (uint8_t)num_reception_participants, true);

participant_1->pub_wait_discovery(num_reception_participants);
participant_1->sub_wait_discovery(num_reception_participants);
participant_1->pub_wait_discovery((uint8_t)num_reception_participants);
participant_1->sub_wait_discovery((uint8_t)num_reception_participants);

auto data_12 = default_helloworld_data_generator();

Expand Down

0 comments on commit b14868d

Please sign in to comment.