From 17d8e65c642a6b81d9f5dcb32f38724891475063 Mon Sep 17 00:00:00 2001 From: "Daniel J. Hofmann" Date: Fri, 4 Sep 2015 18:23:57 +0200 Subject: [PATCH] Silence unused variable warnings --- algorithms/trip_brute_force.hpp | 4 +++- algorithms/trip_farthest_insertion.hpp | 1 + descriptors/json_descriptor.hpp | 1 - plugins/match.hpp | 2 ++ plugins/timestamp.hpp | 2 ++ routing_algorithms/direct_shortest_path.hpp | 2 ++ util/container.hpp | 2 +- 7 files changed, 11 insertions(+), 3 deletions(-) diff --git a/algorithms/trip_brute_force.hpp b/algorithms/trip_brute_force.hpp index 1b451e165..601971cf7 100644 --- a/algorithms/trip_brute_force.hpp +++ b/algorithms/trip_brute_force.hpp @@ -73,6 +73,8 @@ std::vector BruteForceTrip(const NodeIDIterator start, const std::size_t number_of_locations, const DistTableWrapper &dist_table) { + (void)number_of_locations; // unused + const auto component_size = std::distance(start, end); std::vector perm(start, end); @@ -103,4 +105,4 @@ std::vector BruteForceTrip(const NodeIDIterator start, } // end namespace trip } // end namespace osrm -#endif // TRIP_BRUTE_FORCE_HPP \ No newline at end of file +#endif // TRIP_BRUTE_FORCE_HPP diff --git a/algorithms/trip_farthest_insertion.hpp b/algorithms/trip_farthest_insertion.hpp index 5f41248a4..1300cb6f6 100644 --- a/algorithms/trip_farthest_insertion.hpp +++ b/algorithms/trip_farthest_insertion.hpp @@ -54,6 +54,7 @@ GetShortestRoundTrip(const NodeID new_loc, const std::size_t number_of_locations, std::vector &route) { + (void)number_of_locations; // unused auto min_trip_distance = INVALID_EDGE_WEIGHT; NodeIDIter next_insert_point_candidate; diff --git a/descriptors/json_descriptor.hpp b/descriptors/json_descriptor.hpp index a2a280cbc..3e309a493 100644 --- a/descriptors/json_descriptor.hpp +++ b/descriptors/json_descriptor.hpp @@ -295,7 +295,6 @@ template class JSONDescriptor final : public BaseDescriptor< std::vector &route_segments_list) const { osrm::json::Array json_instruction_array; - // Segment information has following format: //["instruction id","streetname",length,position,time,"length","earth_direction",azimuth] unsigned necessary_segments_running_index = 0; diff --git a/plugins/match.hpp b/plugins/match.hpp index 640334215..b749f29e7 100644 --- a/plugins/match.hpp +++ b/plugins/match.hpp @@ -78,6 +78,8 @@ template class MapMatchingPlugin : public BasePlugin TraceClassification classify(const float trace_length, const float matched_length, const int removed_points) const { + (void)removed_points; // unused + const double distance_feature = -std::log(trace_length) + std::log(matched_length); // matched to the same point diff --git a/plugins/timestamp.hpp b/plugins/timestamp.hpp index 8a5d208b7..2f609ea3a 100644 --- a/plugins/timestamp.hpp +++ b/plugins/timestamp.hpp @@ -47,6 +47,8 @@ template class TimestampPlugin final : public BasePlugin int HandleRequest(const RouteParameters &route_parameters, osrm::json::Object &json_result) override final { + (void)route_parameters; // unused + json_result.values["status"] = 0; const std::string timestamp = facade->GetTimestamp(); json_result.values["timestamp"] = timestamp; diff --git a/routing_algorithms/direct_shortest_path.hpp b/routing_algorithms/direct_shortest_path.hpp index 2abee9874..bfd6916e8 100644 --- a/routing_algorithms/direct_shortest_path.hpp +++ b/routing_algorithms/direct_shortest_path.hpp @@ -62,6 +62,8 @@ class DirectShortestPathRouting final const std::vector &uturn_indicators, InternalRouteResult &raw_route_data) const { + (void)uturn_indicators; // unused + engine_working_data.InitializeOrClearFirstThreadLocalStorage( super::facade->GetNumberOfNodes()); engine_working_data.InitializeOrClearSecondThreadLocalStorage( diff --git a/util/container.hpp b/util/container.hpp index d455e94e2..14b88ee68 100644 --- a/util/container.hpp +++ b/util/container.hpp @@ -98,7 +98,7 @@ Function for_each_pair(ContainerT &container, Function function) return for_each_pair(std::begin(container), std::end(container), function); } -template void append_to_container(Container &&a) {} +template void append_to_container(Container &&) {} template void append_to_container(Container &&container, T value, Args &&... args)