Skip to content

Commit

Permalink
Fix warnings on Windows 32bits (#4494)
Browse files Browse the repository at this point in the history
Signed-off-by: Ricardo González <[email protected]>
  • Loading branch information
richiware authored Mar 4, 2024
1 parent 8766e52 commit 043dd77
Show file tree
Hide file tree
Showing 11 changed files with 35 additions and 35 deletions.
2 changes: 1 addition & 1 deletion test/blackbox/common/BlackboxTestsTransportSHM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ TEST(SHM, IgnoreNonExistentSegment)
}
// Check logs
Log::Flush();
EXPECT_EQ(helper_consumer->ConsumedEntries().size(), 0);
EXPECT_EQ(helper_consumer->ConsumedEntries().size(), 0u);

// Clean-up
Log::Reset(); // This calls to ClearConsumers, which deletes the registered consumer
Expand Down
2 changes: 1 addition & 1 deletion test/blackbox/common/DDSBlackboxTestsBasic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -694,7 +694,7 @@ TEST(DDSBasic, participant_ignore_local_endpoints_two_participants)
EXPECT_TRUE(samples.empty());

// Wait for reception
EXPECT_EQ(reader.block_for_all(std::chrono::seconds(1)), 5);
EXPECT_EQ(reader.block_for_all(std::chrono::seconds(1)), 5u);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion test/blackbox/common/DDSBlackboxTestsContentFilter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ class DDSContentFilter : public testing::TestWithParam<communication_type>
}
else
{
EXPECT_EQ(filter_counter.content_filter_info_count, 0);
EXPECT_EQ(filter_counter.content_filter_info_count, 0u);
EXPECT_EQ(filter_counter.max_filter_signature_number, 0u);
}
}
Expand Down
2 changes: 1 addition & 1 deletion test/blackbox/common/DDSBlackboxTestsMonitorService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1253,7 +1253,7 @@ TEST(DDSMonitorServiceTest, monitor_service_simple_proxy)
writer_proxy_msg.status_kind(eprosima::fastdds::statistics::PROXY);
StatisticsGUIDList guids = MSP.get_writer_guids();

ASSERT_EQ(guids.size(), 1);
ASSERT_EQ(guids.size(), 1u);
writer_proxy_msg.local_entity(guids.back());

expected_msgs.push_back(writer_proxy_msg);
Expand Down
20 changes: 10 additions & 10 deletions test/blackbox/common/RTPSBlackboxTestsDiscovery.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -809,11 +809,11 @@ TEST_P(RTPSDiscovery, ContentFilterRegistrationWithoutCFP)
return Iterations::DISCOVERED_READER == iteration || Iterations::WITH_ERROR == iteration;
});
ASSERT_EQ(Iterations::DISCOVERED_READER, iteration);
ASSERT_EQ(0, content_filter_property.content_filtered_topic_name.size());
ASSERT_EQ(0, content_filter_property.related_topic_name.size());
ASSERT_EQ(0, content_filter_property.filter_class_name.size());
ASSERT_EQ(0, content_filter_property.filter_expression.size());
ASSERT_EQ(0, content_filter_property.expression_parameters.size());
ASSERT_EQ(0u, content_filter_property.content_filtered_topic_name.size());
ASSERT_EQ(0u, content_filter_property.related_topic_name.size());
ASSERT_EQ(0u, content_filter_property.filter_class_name.size());
ASSERT_EQ(0u, content_filter_property.filter_expression.size());
ASSERT_EQ(0u, content_filter_property.expression_parameters.size());
}

// Test second iteration: expect ReaderDiscoveryInfo::CHANGED_QOS_READER.
Expand All @@ -825,11 +825,11 @@ TEST_P(RTPSDiscovery, ContentFilterRegistrationWithoutCFP)
return Iterations::CHANGED_QOS_READER == iteration || Iterations::WITH_ERROR == iteration;
});
ASSERT_EQ(Iterations::CHANGED_QOS_READER, iteration);
ASSERT_EQ(0, content_filter_property.content_filtered_topic_name.size());
ASSERT_EQ(0, content_filter_property.related_topic_name.size());
ASSERT_EQ(0, content_filter_property.filter_class_name.size());
ASSERT_EQ(0, content_filter_property.filter_expression.size());
ASSERT_EQ(0, content_filter_property.expression_parameters.size());
ASSERT_EQ(0u, content_filter_property.content_filtered_topic_name.size());
ASSERT_EQ(0u, content_filter_property.related_topic_name.size());
ASSERT_EQ(0u, content_filter_property.filter_class_name.size());
ASSERT_EQ(0u, content_filter_property.filter_expression.size());
ASSERT_EQ(0u, content_filter_property.expression_parameters.size());
}
}

Expand Down
2 changes: 1 addition & 1 deletion test/unittest/dds/subscriber/DataReaderInstanceTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ TEST(DataReaderInstance, writer_update_its_ownership_strength)
// Anything changes because it is not an "alive" writer of the instance.
ASSERT_EQ(dw3_guid, instance.current_owner.first);
ASSERT_EQ(14u, instance.current_owner.second);
ASSERT_EQ(3, instance.alive_writers.size());
ASSERT_EQ(3u, instance.alive_writers.size());
}

/*!
Expand Down
2 changes: 1 addition & 1 deletion test/unittest/dds/subscriber/DataReaderTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2136,7 +2136,7 @@ TEST_F(DataReaderTests, check_read_take_iteration)
EXPECT_EQ(data_reader_->take_instance(data, infos, 1, handles[i]),
ReturnCode_t::RETCODE_OK);

EXPECT_EQ(i, std::atoi(data[0].message().data()));
EXPECT_EQ(static_cast<int>(i), std::atoi(data[0].message().data()));

EXPECT_EQ(ReturnCode_t::RETCODE_OK, data_reader_->return_loan(data, infos));
}
Expand Down
18 changes: 9 additions & 9 deletions test/unittest/dds/subscriber/SubscriberTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -496,15 +496,15 @@ TEST(SubscriberTests, ChangeDefaultDataReaderQos)
EXPECT_EQ(2, wqos.endpoint().entity_id);
EXPECT_EQ(eprosima::fastrtps::rtps::PREALLOCATED_WITH_REALLOC_MEMORY_MODE, wqos.endpoint().history_memory_policy);
// .reader_resource_limits
EXPECT_EQ(30, wqos.reader_resource_limits().matched_publisher_allocation.initial);
EXPECT_EQ(300, wqos.reader_resource_limits().matched_publisher_allocation.maximum);
EXPECT_EQ(4, wqos.reader_resource_limits().matched_publisher_allocation.increment);
EXPECT_EQ(40, wqos.reader_resource_limits().sample_infos_allocation.initial);
EXPECT_EQ(400, wqos.reader_resource_limits().sample_infos_allocation.maximum);
EXPECT_EQ(5, wqos.reader_resource_limits().sample_infos_allocation.increment);
EXPECT_EQ(50, wqos.reader_resource_limits().outstanding_reads_allocation.initial);
EXPECT_EQ(500, wqos.reader_resource_limits().outstanding_reads_allocation.maximum);
EXPECT_EQ(6, wqos.reader_resource_limits().outstanding_reads_allocation.increment);
EXPECT_EQ(30u, wqos.reader_resource_limits().matched_publisher_allocation.initial);
EXPECT_EQ(300u, wqos.reader_resource_limits().matched_publisher_allocation.maximum);
EXPECT_EQ(4u, wqos.reader_resource_limits().matched_publisher_allocation.increment);
EXPECT_EQ(40u, wqos.reader_resource_limits().sample_infos_allocation.initial);
EXPECT_EQ(400u, wqos.reader_resource_limits().sample_infos_allocation.maximum);
EXPECT_EQ(5u, wqos.reader_resource_limits().sample_infos_allocation.increment);
EXPECT_EQ(50u, wqos.reader_resource_limits().outstanding_reads_allocation.initial);
EXPECT_EQ(500u, wqos.reader_resource_limits().outstanding_reads_allocation.maximum);
EXPECT_EQ(6u, wqos.reader_resource_limits().outstanding_reads_allocation.increment);
EXPECT_EQ(33, wqos.reader_resource_limits().max_samples_per_read);
// .data_sharing
EXPECT_EQ(eprosima::fastdds::dds::ON, wqos.data_sharing().kind());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ void assert_is_empty_content_filter(
ASSERT_EQ("", filter_property.related_topic_name.to_string());
ASSERT_EQ("", filter_property.filter_class_name.to_string());
ASSERT_EQ("", filter_property.filter_expression);
ASSERT_EQ(0, filter_property.expression_parameters.size());
ASSERT_EQ(0u, filter_property.expression_parameters.size());
}

TEST(BuiltinDataSerializationTests, ok_with_defaults)
Expand Down
10 changes: 5 additions & 5 deletions test/unittest/transport/TCPv4Tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1511,7 +1511,7 @@ TEST_F(TCPv4Tests, secure_non_blocking_send)
as communication lacks most of the discovery messages using a raw socket as participant.
*/
auto sender_unbound_channel_resources = senderTransportUnderTest.get_unbound_channel_resources();
ASSERT_TRUE(sender_unbound_channel_resources.size() == 1);
ASSERT_TRUE(sender_unbound_channel_resources.size() == 1u);
auto sender_channel_resource =
std::static_pointer_cast<TCPChannelResourceBasic>(sender_unbound_channel_resources[0]);

Expand Down Expand Up @@ -1945,7 +1945,7 @@ TEST_F(TCPv4Tests, client_announced_local_port_uniqueness)

std::this_thread::sleep_for(std::chrono::milliseconds(100));

ASSERT_EQ(receiveTransportUnderTest.get_channel_resources().size(), 2);
ASSERT_EQ(receiveTransportUnderTest.get_channel_resources().size(), 2u);
}

#ifndef _WIN32
Expand Down Expand Up @@ -2009,7 +2009,7 @@ TEST_F(TCPv4Tests, non_blocking_send)
as communication lacks most of the discovery messages using a raw socket as participant.
*/
auto sender_unbound_channel_resources = senderTransportUnderTest.get_unbound_channel_resources();
ASSERT_TRUE(sender_unbound_channel_resources.size() == 1);
ASSERT_TRUE(sender_unbound_channel_resources.size() == 1u);
auto sender_channel_resource =
std::static_pointer_cast<TCPChannelResourceBasic>(sender_unbound_channel_resources[0]);

Expand Down Expand Up @@ -2138,11 +2138,11 @@ TEST_F(TCPv4Tests, opening_output_channel_with_same_locator_as_local_listening_p
// If the remote address is lower than the local one, no channel must be created but it must be added to the send_resource_list
ASSERT_TRUE(transportUnderTest.OpenOutputChannel(send_resource_list, lowerOutputChannelLocator));
ASSERT_FALSE(transportUnderTest.is_output_channel_open_for(lowerOutputChannelLocator));
ASSERT_EQ(send_resource_list.size(), 1);
ASSERT_EQ(send_resource_list.size(), 1u);
// If the remote address is higher than the local one, a CONNECT channel must be created and added to the send_resource_list
ASSERT_TRUE(transportUnderTest.OpenOutputChannel(send_resource_list, higherOutputChannelLocator));
ASSERT_TRUE(transportUnderTest.is_output_channel_open_for(higherOutputChannelLocator));
ASSERT_EQ(send_resource_list.size(), 2);
ASSERT_EQ(send_resource_list.size(), 2u);
}

void TCPv4Tests::HELPER_SetDescriptorDefaults()
Expand Down
8 changes: 4 additions & 4 deletions test/unittest/transport/TCPv6Tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ TEST_F(TCPv6Tests, autofill_port)
transportUnderTest_autofill.init();

EXPECT_TRUE(transportUnderTest_autofill.configuration()->listening_ports[0] != 0);
EXPECT_TRUE(transportUnderTest_autofill.configuration()->listening_ports.size() == 1);
EXPECT_TRUE(transportUnderTest_autofill.configuration()->listening_ports.size() == 1u);
}

static void GetIP6s(
Expand Down Expand Up @@ -297,7 +297,7 @@ TEST_F(TCPv6Tests, client_announced_local_port_uniqueness)

std::this_thread::sleep_for(std::chrono::milliseconds(100));

ASSERT_EQ(receiveTransportUnderTest.get_channel_resources().size(), 2);
ASSERT_EQ(receiveTransportUnderTest.get_channel_resources().size(), 2u);
}

#ifndef _WIN32
Expand Down Expand Up @@ -361,7 +361,7 @@ TEST_F(TCPv6Tests, non_blocking_send)
as communication lacks most of the discovery messages using a raw socket as participant.
*/
auto sender_unbound_channel_resources = senderTransportUnderTest.get_unbound_channel_resources();
ASSERT_TRUE(sender_unbound_channel_resources.size() == 1);
ASSERT_TRUE(sender_unbound_channel_resources.size() == 1u);
auto sender_channel_resource =
std::static_pointer_cast<TCPChannelResourceBasic>(sender_unbound_channel_resources[0]);

Expand Down Expand Up @@ -493,7 +493,7 @@ TEST_F(TCPv6Tests, opening_output_channel_with_same_locator_as_local_listening_p
// If the remote address is higher than the local one, a CONNECT channel must be created and added to the send_resource_list
ASSERT_TRUE(transportUnderTest.OpenOutputChannel(send_resource_list, higherOutputChannelLocator));
ASSERT_TRUE(transportUnderTest.is_output_channel_open_for(higherOutputChannelLocator));
ASSERT_EQ(send_resource_list.size(), 2);
ASSERT_EQ(send_resource_list.size(), 2u);
}

/*
Expand Down

0 comments on commit 043dd77

Please sign in to comment.