Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove warning from builds and add -Wall by default #190

Open
greenscientist opened this issue Nov 4, 2022 · 2 comments · Fixed by #195
Open

Remove warning from builds and add -Wall by default #190

greenscientist opened this issue Nov 4, 2022 · 2 comments · Fixed by #195
Assignees

Comments

@greenscientist
Copy link
Contributor

No description provided.

@greenscientist greenscientist self-assigned this Nov 4, 2022
@greenscientist greenscientist linked a pull request Nov 16, 2022 that will close this issue
@greenscientist
Copy link
Contributor Author

We have about 4-5 warnings left that are harder to remove. They require a more thoughful analysis of the logic impact

@greenscientist
Copy link
Contributor Author

In file included from /usr/include/boost/assert.hpp:58,
from /usr/include/boost/container_hash/detail/hash_float.hpp:19,
from /usr/include/boost/container_hash/hash.hpp:22,
from /usr/include/boost/functional/hash.hpp:6,
from ../../include/node.hpp:10,
from ../../connection_scan_algorithm/include/calculator.hpp:17,
from optimize_journey.cpp:3:
optimize_journey.cpp: In member function 'std::vector TrRouting::Calculator::optimizeJourney(std::deque<std::tuple<int, int, std::optional<std::reference_wrapper >, int, short int, int> >&)':
optimize_journey.cpp:177:50: warning: comparison of integer expressions of different signedness: 'std::vector::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
177 | assert(trip.reverseConnectionsIdx.size() > 1 + sequenceEndIdx); // make sure sequenceIdx will be valid
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
reverse_calculation.cpp: In member function 'std::optional<std::tuple<int, std::reference_wrapper > > TrRouting::Calculator::reverseCalculation(TrRouting::RouteParameters&)':
reverse_calculation.cpp:44:30: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector::size_type' {aka 'long unsigned int'} [-Wsign-compare]
44 | i = (arrivalTimeHour + 1 >= reverseConnectionsIndexPerArrivalTimeHour.size()) ? 0 : reverseConnectionsIndexPerArrivalTimeHour[arrivalTimeHour + 1];
| ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
forward_journey.cpp: In member function 'std::unique_ptrTrRouting::RoutingResult TrRouting::Calculator::forwardJourneyStep(TrRouting::RouteParameters&, int, std::optional<std::reference_wrapper >)':
forward_journey.cpp:161:40: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector::size_type' {aka 'long unsigned int'} [-Wsign-compare]
161 | if (unboardingSequence - 1 < journeyStepTrip.path.segmentsDistanceMeters.size()) // check if distances are available for this path
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
reverse_journey.cpp: In member function 'std::unique_ptrTrRouting::RoutingResult TrRouting::Calculator::reverseJourneyStep(TrRouting::RouteParameters&, int, std::optional<std::reference_wrapper >)':
reverse_journey.cpp:189:40: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector::size_type' {aka 'long unsigned int'} [-Wsign-compare]
189 | if (unboardingSequence - 1 < journeyStepTrip.path.segmentsDistanceMeters.size()) // check if distances are available for this path

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant