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(reaction_analyzer): fix unreadVariable #8373

Conversation

kobayu858
Copy link
Contributor

Description

This is a fix based on cppcheck unreadVariable warnings.

tools/reaction_analyzer/src/utils.cpp:225:27: style: Variable 'current_distance' is assigned a value that is never used. [unreadVariable]
  double current_distance = 0.0;
                          ^

Related links

Parent Issue:

  • Link

How was this PR tested?

Notes for reviewers

None.

Interface changes

None.

Effects on system behavior

None.

Signed-off-by: kobayu858 <[email protected]>
@kobayu858 kobayu858 requested a review from brkay54 as a code owner August 6, 2024 05:04
@github-actions github-actions bot added the component:tools Utility and debugging software. (auto-assigned) label Aug 6, 2024
@kobayu858 kobayu858 requested a review from veqcc August 6, 2024 05:04
Copy link

github-actions bot commented Aug 6, 2024

Thank you for contributing to the Autoware project!

🚧 If your pull request is in progress, switch it to draft mode.

Please ensure:

Signed-off-by: kobayu858 <[email protected]>
@kobayu858 kobayu858 added the tag:run-build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Aug 9, 2024
Copy link

codecov bot commented Aug 9, 2024

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Please upload report for BASE (main@e0fa943). Learn more about missing BASE report.
Report is 104 commits behind head on main.

Files Patch % Lines
tools/reaction_analyzer/src/utils.cpp 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #8373   +/-   ##
=======================================
  Coverage        ?   23.72%           
=======================================
  Files           ?     1379           
  Lines           ?   101368           
  Branches        ?    38515           
=======================================
  Hits            ?    24047           
  Misses          ?    74866           
  Partials        ?     2455           
Flag Coverage Δ *Carryforward flag
differential 0.00% <0.00%> (?)
total 23.72% <ø> (?) Carriedforward from ba34878

*This pull request uses carry forward flags. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@kobayu858
Copy link
Contributor Author

@brkay54

Please confirm the PR. Thank you very much.

Copy link
Member

@brkay54 brkay54 left a comment

Choose a reason for hiding this comment

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

No need to define current_distance before the loop. LGTM. Thanks.

@brkay54 brkay54 self-requested a review August 16, 2024 09:24
Copy link
Member

@brkay54 brkay54 left a comment

Choose a reason for hiding this comment

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

Sorry for the inconvenience, it seems there is another PR which proposed almost same changes:

making const double is better so IMO we can close this PR.

@veqcc
Copy link
Contributor

veqcc commented Aug 21, 2024

@brkay54
Thank you for the reply!! I will colse this PR instead of @kobayu858 ans merge #8450

@veqcc veqcc closed this Aug 21, 2024
@kobayu858 kobayu858 deleted the fix/cppcheck_unreadVariable_too-1 branch August 21, 2024 06:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:tools Utility and debugging software. (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.

3 participants