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(autoware_freespace_planning_algorithms): fix bugprone-errors #9670

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

kobayu858
Copy link
Contributor

Description

This is a fix based on clang-tidy bugprone-signed-char-misuse and bugprone-integer-division error.

/home/emb4/autoware/autoware/src/universe/autoware.universe/planning/autoware_freespace_planning_algorithms/src/abstract_algorithm.cpp:118:22: error: 'signed char' to 'const int' conversion; consider casting to 'unsigned char' first. [bugprone-signed-char-misuse,-warnings-as-errors]
    const int cost = costmap_.data[i];
                     ^

/home/emb4/autoware/autoware/src/universe/autoware.universe/planning/autoware_freespace_planning_algorithms/src/astar_search.cpp:391:11: error: result of integer division used in a floating point context; possible loss of precision [bugprone-integer-division,-warnings-as-errors]
         (abs(steering_index) / planner_common_param_.turning_steps);
          ^

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]>
Copy link

github-actions bot commented Dec 17, 2024

Thank you for contributing to the Autoware project!

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

Please ensure:

@github-actions github-actions bot added the component:planning Route planning, decision-making, and navigation. (auto-assigned) label Dec 17, 2024
@kobayu858 kobayu858 added tag:run-build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) and removed tag:run-build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) labels Dec 17, 2024
@kobayu858 kobayu858 marked this pull request as draft December 17, 2024 04:32
Signed-off-by: kobayu858 <[email protected]>
@kobayu858 kobayu858 marked this pull request as ready for review December 17, 2024 04:41
@kobayu858 kobayu858 added the tag:run-build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Dec 17, 2024
Copy link

codecov bot commented Dec 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 29.83%. Comparing base (b9ebc42) to head (523f650).
Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9670      +/-   ##
==========================================
- Coverage   29.83%   29.83%   -0.01%     
==========================================
  Files        1443     1449       +6     
  Lines      108599   108640      +41     
  Branches    42667    42666       -1     
==========================================
+ Hits        32405    32409       +4     
- Misses      73011    73049      +38     
+ Partials     3183     3182       -1     
Flag Coverage Δ *Carryforward flag
differential 24.49% <100.00%> (?)
total 29.83% <ø> (-0.01%) ⬇️ Carriedforward from b9ebc42

*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.

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
Status: To Triage
Development

Successfully merging this pull request may close these issues.

2 participants