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

fix(route_handler): fix std::accumlation related bug #6983

Conversation

veqcc
Copy link
Contributor

@veqcc veqcc commented May 11, 2024

Description

This is a fix based on clang-tidy warning

folding type 'double' into type 'int' might result in loss of precision	1

The accumulation is conducted as int, not as double, in the previous implementation.

Tests performed

No

Effects on system behavior

Interface changes

Pre-review checklist for the PR author

The PR author must check the checkboxes below when creating the PR.

In-review checklist for the PR reviewers

The PR reviewers must check the checkboxes below before approval.

Post-review checklist for the PR author

The PR author must check the checkboxes below before merging.

  • There are no open discussions or they are tracked via tickets.

After all checkboxes are checked, anyone who has write access can merge the PR.

Signed-off-by: Ryuta Kambe <ryuta.kambe@tier4.jp>
@github-actions github-actions bot added the component:planning Route planning, decision-making, and navigation. (auto-assigned) label May 11, 2024
@veqcc veqcc added the tag:run-build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label May 11, 2024
@soblin
Copy link
Contributor

soblin commented May 11, 2024

Is this all the true positive warnings from clang-tidy? I'd appreciate if you get rid of all the warning in a single PR. Thanks!

@veqcc
Copy link
Contributor Author

veqcc commented May 11, 2024

@soblin
Thenk you for your quick review!

Is this all the true positive warnings from clang-tidy?

No. There are tremendous (true psitive) warnings from clang-tidy 🥹
I cannot fix all of them in one PR.

As for std::accumlation related warnings, there is acutualy one more same bug in system module.
Do you think this PR should include system module bugfix?

@soblin
Copy link
Contributor

soblin commented May 11, 2024

OK, then can you purge as many errors only in route_handler as possible? If this is all, then I will merge this ASAP

@veqcc
Copy link
Contributor Author

veqcc commented May 11, 2024

@soblin
Other warnings in route_hander are as follows.
These would not cause immediate bugs. They are rather improvements.
I will leave it up to you whether to accept them or not (and if you accept, I will include these modifications to this PR)

Copy link
Contributor

@soblin soblin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like [useStlAlgorithm] should be disabled for checking.

@veqcc veqcc closed this May 17, 2024
@veqcc veqcc deleted the fix/incorrect_accumulation_in_route_handler branch May 17, 2024 08:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:planning Route planning, decision-making, and navigation. (auto-assigned) tag:run-build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants