Skip to content

Commit

Permalink
iox-eclipse-iceoryx#65 Fix compiler warnings.
Browse files Browse the repository at this point in the history
Signed-off-by: Ithier Jeff (CC-AD/EYF1) <[email protected]>
  • Loading branch information
orecham committed Jul 6, 2020
1 parent 375f0a0 commit 11ce23b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
6 changes: 3 additions & 3 deletions iceoryx_dds/source/iceoryx_dds/dds/cyclone_data_reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,10 @@ iox::cxx::expected<uint64_t, iox::dds::DataReaderError> iox::dds::CycloneDataRea
}

// Read up to the maximum number of samples that can fit in the buffer.
auto samples = m_impl.select().max_samples(maxSamples).state(::dds::sub::status::SampleState::not_read()).take();
auto samples = m_impl.select().max_samples(static_cast<uint32_t>(maxSamples)).state(::dds::sub::status::SampleState::not_read()).take();

// Copy data into the provided buffer.
auto numSamplesBuffered = 0u;
uint64_t numSamplesBuffered = 0u;
if (samples.length() > 0)
{
// Sample validation checks
Expand All @@ -92,7 +92,7 @@ iox::cxx::expected<uint64_t, iox::dds::DataReaderError> iox::dds::CycloneDataRea
}

// Do copy
uint8_t cursor = 0; // Tracks the position in the buffer to write next sample.
uint64_t cursor = 0; // Tracks the position in the buffer to write next sample.
for (const auto& sample : samples)
{
auto bytes = sample.data().payload().data();
Expand Down
8 changes: 5 additions & 3 deletions iceoryx_dds/source/iceoryx_dds/dds/cyclone_data_writer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,14 @@ void iox::dds::CycloneDataWriter::write(const uint8_t* const bytes, const uint64
iox::dds::IdString iox::dds::CycloneDataWriter::getServiceId() const noexcept
{
return m_serviceId;
};
}

iox::dds::IdString iox::dds::CycloneDataWriter::getInstanceId() const noexcept
{
return m_instanceId;
};
}

iox::dds::IdString iox::dds::CycloneDataWriter::getEventId() const noexcept
{
return m_eventId;
};
}

0 comments on commit 11ce23b

Please sign in to comment.