From a73ed57c158afd7d934795cd5e8c3ef731586e67 Mon Sep 17 00:00:00 2001 From: vicky Date: Fri, 15 Mar 2024 13:39:38 -0600 Subject: [PATCH 1/6] (test/gurka/test_traffic_smoothing.cc) unused parameter e --- test/gurka/CMakeLists.txt | 1 - test/gurka/test_traffic_smoothing.cc | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/test/gurka/CMakeLists.txt b/test/gurka/CMakeLists.txt index fd20e7806c..ecb5240aaf 100644 --- a/test/gurka/CMakeLists.txt +++ b/test/gurka/CMakeLists.txt @@ -26,7 +26,6 @@ if(ENABLE_DATA_TOOLS) test_recost.cc test_time_tracking.cc test_traffic.cc - test_traffic_smoothing.cc ) ## Add executable targets diff --git a/test/gurka/test_traffic_smoothing.cc b/test/gurka/test_traffic_smoothing.cc index ef31753916..1f3d76fa40 100644 --- a/test/gurka/test_traffic_smoothing.cc +++ b/test/gurka/test_traffic_smoothing.cc @@ -558,7 +558,7 @@ class MapMatchWithTraffic : public ::testing::Test { traffic_speed->breakpoint1 = 255; }); - test::customize_historical_traffic(map.config, [](DirectedEdge& e) { + test::customize_historical_traffic(map.config, [](DirectedEdge&) { // speeds for every 5 min bucket of the week std::array historical; historical.fill(6); From ed26aac6ee32eefab22d0849c87bec0f1eaaf430 Mon Sep 17 00:00:00 2001 From: vicky Date: Fri, 15 Mar 2024 13:47:13 -0600 Subject: [PATCH 2/6] (test/gurka/test_traffic.cc) unused variable existing --- test/gurka/CMakeLists.txt | 1 - test/gurka/test_traffic.cc | 2 -- 2 files changed, 3 deletions(-) diff --git a/test/gurka/CMakeLists.txt b/test/gurka/CMakeLists.txt index ecb5240aaf..abbba06faa 100644 --- a/test/gurka/CMakeLists.txt +++ b/test/gurka/CMakeLists.txt @@ -25,7 +25,6 @@ if(ENABLE_DATA_TOOLS) test_phonemes_w_langs.cc test_recost.cc test_time_tracking.cc - test_traffic.cc ) ## Add executable targets diff --git a/test/gurka/test_traffic.cc b/test/gurka/test_traffic.cc index 613852a869..411cde3707 100644 --- a/test/gurka/test_traffic.cc +++ b/test/gurka/test_traffic.cc @@ -296,8 +296,6 @@ TEST(Traffic, CutGeoms) { uint32_t index, baldr::TrafficSpeed* current) -> void { baldr::GraphId tile_id(tile.header->tile_id); auto BD = gurka::findEdge(reader, map.nodes, "BD", "D", tile_id); - baldr::TrafficSpeed* existing = - const_cast(tile.speeds + index); current->breakpoint1 = 255; if (std::get<1>(BD) != nullptr && std::get<0>(BD).id() == index) { current->overall_encoded_speed = 0; From 239ac3025fbbf9cd953d9db078f848d7a78ad033 Mon Sep 17 00:00:00 2001 From: vicky Date: Fri, 15 Mar 2024 13:57:13 -0600 Subject: [PATCH 3/6] (test/gurka/test_traffic.cc) unused variable existing --- test/gurka/CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/test/gurka/CMakeLists.txt b/test/gurka/CMakeLists.txt index abbba06faa..a7de821745 100644 --- a/test/gurka/CMakeLists.txt +++ b/test/gurka/CMakeLists.txt @@ -17,7 +17,6 @@ if(ENABLE_DATA_TOOLS) test_landmarks.cc test_languages.cc test_locate.cc - test_match.cc test_multi_level_loki.cc test_osrm_serializer.cc test_pbf_api.cc From d2e2622a4f84ccd64cfb996a8844c99c983ac32b Mon Sep 17 00:00:00 2001 From: vicky Date: Fri, 15 Mar 2024 13:58:55 -0600 Subject: [PATCH 4/6] (test/gurka/test_landmarks.cc) -Wsign-compare --- test/gurka/CMakeLists.txt | 1 - test/gurka/test_landmarks.cc | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/test/gurka/CMakeLists.txt b/test/gurka/CMakeLists.txt index a7de821745..d23ec98fa7 100644 --- a/test/gurka/CMakeLists.txt +++ b/test/gurka/CMakeLists.txt @@ -14,7 +14,6 @@ if(ENABLE_DATA_TOOLS) test_elevation.cc test_gtfs.cc test_instructions_roundabout.cc - test_landmarks.cc test_languages.cc test_locate.cc test_multi_level_loki.cc diff --git a/test/gurka/test_landmarks.cc b/test/gurka/test_landmarks.cc index c4855213e2..53eece209c 100644 --- a/test/gurka/test_landmarks.cc +++ b/test/gurka/test_landmarks.cc @@ -620,7 +620,7 @@ TEST(LandmarkTest, TestLandmarksInManeuvers) { "Checking landmarks in maneuver failed: cannot find the maneuver in the expected result!"); } ASSERT_EQ(result_landmarks.size(), expected->second.size()); - for (auto i = 0; i < result_landmarks.size(); ++i) { + for (size_t i = 0; i < result_landmarks.size(); ++i) { EXPECT_EQ(result_landmarks[i], expected->second[i]); } } From 04e27f0921fd2c0099c73ce26299211fa4665b91 Mon Sep 17 00:00:00 2001 From: vicky Date: Fri, 15 Mar 2024 14:03:25 -0600 Subject: [PATCH 5/6] (test/gurka/test_elevation.cc) -Wunused-but-set-variable --- test/gurka/CMakeLists.txt | 1 - test/gurka/test_elevation.cc | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/test/gurka/CMakeLists.txt b/test/gurka/CMakeLists.txt index d23ec98fa7..6e8a28733d 100644 --- a/test/gurka/CMakeLists.txt +++ b/test/gurka/CMakeLists.txt @@ -11,7 +11,6 @@ if(ENABLE_DATA_TOOLS) # "-Werror" flag # Avoid adding a filename to this list set(TESTS_WITH_WARNINGS - test_elevation.cc test_gtfs.cc test_instructions_roundabout.cc test_languages.cc diff --git a/test/gurka/test_elevation.cc b/test/gurka/test_elevation.cc index 0f7a8c7fe9..ba2916a019 100644 --- a/test/gurka/test_elevation.cc +++ b/test/gurka/test_elevation.cc @@ -220,7 +220,7 @@ TEST(Standalone, ElevationCompareToSkadi) { result.Parse(route_json.c_str()); for (size_t leg_index = 0; leg_index < waypoints.size() - 1; ++leg_index) { - auto s = + [[maybe_unused]] auto s = rapidjson::get_child_optional(result, ("/trip/legs/" + std::to_string(leg_index) + "/shape") .c_str()); From 2bfde9e6c04ce61bec3cf083c18f2f7fb0432cc2 Mon Sep 17 00:00:00 2001 From: vicky Date: Fri, 15 Mar 2024 14:11:29 -0600 Subject: [PATCH 6/6] test_match.cc --- test/gurka/test_match.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/gurka/test_match.cc b/test/gurka/test_match.cc index 3198b862c5..3be216b114 100644 --- a/test/gurka/test_match.cc +++ b/test/gurka/test_match.cc @@ -262,8 +262,9 @@ uint32_t speed_from_edge(const valhalla::Api& api, bool compare_with_previous_ed node.cost().elapsed_cost().seconds() - node.cost().transition_cost().seconds()) / 3600.0; auto new_kmh = static_cast(km / h + .5); - if (is_valid(kmh) && compare_with_previous_edge) + if (is_valid(kmh) && compare_with_previous_edge) { EXPECT_EQ(kmh, new_kmh); + } kmh = new_kmh; } return kmh;