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_obstacle_cruise_planner): fix shadowVariable warning #7656

Merged
merged 3 commits into from
Jun 24, 2024

Conversation

Koichi98
Copy link
Contributor

Description

This is a fix based on cppcheck warning.

src/universe/autoware.universe/planning/autoware_obstacle_cruise_planner/src/pid_based_planner/pid_based_planner.cpp:584:15: style: Local variable 'i' shadows outer variable [shadowVariable]
  for (size_t i = 0; i < s_vec.size(); ++i) {
              ^
src/universe/autoware.universe/planning/autoware_obstacle_cruise_planner/src/pid_based_planner/pid_based_planner.cpp:512:16: note: Shadowed declaration
  const auto & i = longitudinal_info_;
               ^
src/universe/autoware.universe/planning/autoware_obstacle_cruise_planner/src/pid_based_planner/pid_based_planner.cpp:584:15: note: Shadow variable
  for (size_t i = 0; i < s_vec.size(); ++i) {
              ^
src/universe/autoware.universe/planning/autoware_obstacle_cruise_planner/src/pid_based_planner/pid_based_planner.cpp:600:15: style: Local variable 'i' shadows outer variable [shadowVariable]
  for (size_t i = ego_seg_idx; i < acc_limited_traj_points.size(); ++i) {
              ^
src/universe/autoware.universe/planning/autoware_obstacle_cruise_planner/src/pid_based_planner/pid_based_planner.cpp:512:16: note: Shadowed declaration
  const auto & i = longitudinal_info_;
               ^
src/universe/autoware.universe/planning/autoware_obstacle_cruise_planner/src/pid_based_planner/pid_based_planner.cpp:600:15: note: Shadow variable
  for (size_t i = ego_seg_idx; i < acc_limited_traj_points.size(); ++i) {
              ^

Tests performed

Not applicable.

Effects on system behavior

Not applicable.

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.

@github-actions github-actions bot added the component:planning Route planning, decision-making, and navigation. (auto-assigned) label Jun 24, 2024
@Koichi98 Koichi98 added the run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Jun 24, 2024
Copy link

codecov bot commented Jun 24, 2024

Codecov Report

Attention: Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.

Project coverage is 6.52%. Comparing base (507e3f4) to head (53fc7ba).
Report is 121 commits behind head on main.

Files Patch % Lines
...lanner/src/pid_based_planner/pid_based_planner.cpp 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #7656       +/-   ##
==========================================
- Coverage   14.84%   6.52%    -8.33%     
==========================================
  Files        1999     138     -1861     
  Lines      139163   14531   -124632     
  Branches    43716    2541    -41175     
==========================================
- Hits        20661     948    -19713     
+ Misses      95731   13474    -82257     
+ Partials    22771     109    -22662     
Flag Coverage Δ
differential 6.52% <0.00%> (?)
total ?

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

@Koichi98 Koichi98 merged commit d563f1d into autowarefoundation:main Jun 24, 2024
28 of 30 checks passed
@Koichi98 Koichi98 deleted the fix_shadowVariable branch June 24, 2024 08:54
simon-eisenmann-driveblocks pushed a commit to simon-eisenmann-driveblocks/autoware.universe that referenced this pull request Jun 26, 2024
…towarefoundation#7656)

* fix(autoware_obstacle_cruise_planner): fix shadowVariable warning

Signed-off-by: Koichi Imai <[email protected]>

* fix

Signed-off-by: Koichi Imai <[email protected]>

* style(pre-commit): autofix

---------

Signed-off-by: Koichi Imai <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Signed-off-by: Simon Eisenmann <[email protected]>
tby-udel pushed a commit to tby-udel/autoware.universe that referenced this pull request Jul 14, 2024
…towarefoundation#7656)

* fix(autoware_obstacle_cruise_planner): fix shadowVariable warning

Signed-off-by: Koichi Imai <[email protected]>

* fix

Signed-off-by: Koichi Imai <[email protected]>

* style(pre-commit): autofix

---------

Signed-off-by: Koichi Imai <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
KhalilSelyan pushed a commit that referenced this pull request Jul 22, 2024
)

* fix(autoware_obstacle_cruise_planner): fix shadowVariable warning

Signed-off-by: Koichi Imai <[email protected]>

* fix

Signed-off-by: Koichi Imai <[email protected]>

* style(pre-commit): autofix

---------

Signed-off-by: Koichi Imai <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
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) 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