Skip to content

Commit

Permalink
Refs 12051. Fix warnings on Windows
Browse files Browse the repository at this point in the history
Signed-off-by: Iker Luengo <ikerluengo@eprosima.com>
  • Loading branch information
IkerLuengo committed Jul 28, 2021
1 parent edcdc70 commit a7fd9bd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/cpp/rtps/DataSharing/DataSharingNotification.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ class DataSharingNotification
segment_id_ = reader_guid;
segment_name_ = generate_segment_name(shared_dir, reader_guid);

size_t per_allocation_extra_size = T::compute_per_allocation_extra_size(
uint32_t per_allocation_extra_size = T::compute_per_allocation_extra_size(
alignof(Notification), DataSharingNotification::domain_name());
uint32_t segment_size = static_cast<uint32_t>(sizeof(Notification)) + per_allocation_extra_size;

Expand Down
4 changes: 2 additions & 2 deletions src/cpp/utils/shared_memory/SharedMemSegment.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -339,10 +339,10 @@ class SharedSegment : public SharedSegmentBase
{
managed_shared_memory_type
test_segment(boost::interprocess::create_only, name.c_str(),
(std::max)((size_t)1024, allocation_alignment * 4));
(std::max)((uint32_t)1024, static_cast<uint32_t>(allocation_alignment * 4)));

auto m1 = test_segment.get_free_memory();
test_segment.allocate_aligned(1, allocation_alignment);
test_segment.allocate_aligned(1, static_cast<uint32_t>(allocation_alignment));
auto m2 = test_segment.get_free_memory();
extra_size = static_cast<uint32_t>(m1 - m2);
}
Expand Down

0 comments on commit a7fd9bd

Please sign in to comment.