From 10e0758a2124e8d9d6253a9160e593303b38f71e Mon Sep 17 00:00:00 2001 From: "Enrico Loparco (eloparco)" Date: Fri, 16 Sep 2022 14:53:05 +0000 Subject: fix(gcc): fix gcc warnings Ref: HICN-787 Signed-off-by: Enrico Loparco (eloparco) Change-Id: I2a69be00382f6e5b2544b766d6ac9e1f8cae4bd6 --- apps/ping/src/ping_client.cc | 4 ++-- apps/ping/src/ping_server.cc | 2 ++ libtransport/src/test/test_traffic_generator.cc | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/apps/ping/src/ping_client.cc b/apps/ping/src/ping_client.cc index 747f4bd1b..6599b74cb 100644 --- a/apps/ping/src/ping_client.cc +++ b/apps/ping/src/ping_client.cc @@ -249,8 +249,8 @@ class Client : private interface::Portal::TransportCallback { if (!config_->quiet_) std::cout << std::endl; send_timestamps_[sequence_number] = utils::SteadyTime::now(); - for (int i = 0; i < config_->num_int_manifest_suffixes_ && - !traffic_generator_->hasFinished(); + for (uint32_t i = 0; i < config_->num_int_manifest_suffixes_ && + !traffic_generator_->hasFinished(); i++) { uint32_t sequence_number = traffic_generator_->getSuffix(); diff --git a/apps/ping/src/ping_server.cc b/apps/ping/src/ping_server.cc index b91b2c612..325ef675c 100644 --- a/apps/ping/src/ping_server.cc +++ b/apps/ping/src/ping_server.cc @@ -149,6 +149,8 @@ class CallbackContainer { p.produce(*content_object); } else { // Interest manifest uint32_t _, *suffix = NULL; + UNUSED(_); + interest_manifest_foreach_suffix(interest.getIntManifestHeader(), suffix, _) { name.setSuffix(*suffix); diff --git a/libtransport/src/test/test_traffic_generator.cc b/libtransport/src/test/test_traffic_generator.cc index 88cb2de75..733acbb74 100644 --- a/libtransport/src/test/test_traffic_generator.cc +++ b/libtransport/src/test/test_traffic_generator.cc @@ -88,7 +88,7 @@ TEST_F(TrafficGeneratorTest, IncrSuffixCheckSentCount) { PREFIX, FIRST_SUFFIX, NUM_PINGS); for (int i = 0; i < NUM_PINGS; i++) { - EXPECT_EQ(traffic_generator_->getSentCount(), i); + EXPECT_EQ(traffic_generator_->getSentCount(), (uint32_t)i); EXPECT_FALSE(traffic_generator_->hasFinished()); traffic_generator_->getSuffix(); } -- cgit 1.2.3-korg