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(net_monitor): fix cppcheck warnings #7573

Merged
merged 5 commits into from
Jun 19, 2024

Conversation

veqcc
Copy link
Contributor

@veqcc veqcc commented Jun 19, 2024

Description

This is a fix based on cppcheck warnings below

system/system_monitor/src/net_monitor/net_monitor.cpp:285:12: style: The scope of the variable 'unit_reassembles_failed' can be reduced. [variableScope]
  uint64_t unit_reassembles_failed = 0;
           ^
system/system_monitor/src/net_monitor/net_monitor.cpp:159:15: style: Unused variable: error_str [unusedVariable]
  std::string error_str;
              ^
system/system_monitor/src/net_monitor/net_monitor.cpp:160:28: style: Unused variable: interface_names [unusedVariable]
  std::vector<std::string> interface_names;
                           ^
system/system_monitor/src/net_monitor/net_monitor.cpp:457:21: style: Variable 'ether_request.cmd' is assigned a value that is never used. [unreadVariable]
  ether_request.cmd = ETHTOOL_GSET;
                    ^

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.

Signed-off-by: Ryuta Kambe <[email protected]>
Signed-off-by: Ryuta Kambe <[email protected]>
Signed-off-by: Ryuta Kambe <[email protected]>
Signed-off-by: Ryuta Kambe <[email protected]>
@github-actions github-actions bot added the component:system System design and integration. (auto-assigned) label Jun 19, 2024
@veqcc veqcc added DevOps Dojo: Build & Run Related to Open AD Kit WG tag:run-build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) and removed DevOps Dojo: Build & Run Related to Open AD Kit WG labels Jun 19, 2024
Copy link

codecov bot commented Jun 19, 2024

Codecov Report

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

Project coverage is 0.00%. Comparing base (507e3f4) to head (99b254c).
Report is 50 commits behind head on main.

Files Patch % Lines
...tem/system_monitor/src/net_monitor/net_monitor.cpp 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #7573       +/-   ##
==========================================
- Coverage   14.84%   0.00%   -14.85%     
==========================================
  Files        1999      54     -1945     
  Lines      139163    4014   -135149     
  Branches    43716     440    -43276     
==========================================
- Hits        20661       0    -20661     
+ Misses      95731    4014    -91717     
+ Partials    22771       0    -22771     
Flag Coverage Δ
differential 0.00% <0.00%> (?)
total ?

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

Signed-off-by: Ryuta Kambe <[email protected]>
@ito-san ito-san enabled auto-merge (squash) June 19, 2024 05:15
@veqcc
Copy link
Contributor Author

veqcc commented Jun 19, 2024

@ito-san @TetsuKawa
Could you approve it?

@ito-san
Copy link
Contributor

ito-san commented Jun 19, 2024

@ito-san @TetsuKawa Could you approve it?

@veqcc checking if the corrections are working properly, so please wait.

@ito-san ito-san self-requested a review June 19, 2024 07:16
Copy link
Contributor

@ito-san ito-san left a comment

Choose a reason for hiding this comment

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

@veqcc
Verified it works correctly. Thanks!
image

@ito-san ito-san merged commit 0a2f1e3 into autowarefoundation:main Jun 19, 2024
28 of 30 checks passed
@veqcc veqcc deleted the fix_net_monitor branch June 19, 2024 07:18
simon-eisenmann-driveblocks pushed a commit to simon-eisenmann-driveblocks/autoware.universe that referenced this pull request Jun 26, 2024
* fix unusedVariable warning

Signed-off-by: Ryuta Kambe <[email protected]>

* fix unusedVariable warning

Signed-off-by: Ryuta Kambe <[email protected]>

* fix variableScope warning

Signed-off-by: Ryuta Kambe <[email protected]>

* fix unreadVariable warning

Signed-off-by: Ryuta Kambe <[email protected]>

* fix

Signed-off-by: Ryuta Kambe <[email protected]>

---------

Signed-off-by: Ryuta Kambe <[email protected]>
Signed-off-by: Simon Eisenmann <[email protected]>
KhalilSelyan pushed a commit that referenced this pull request Jul 22, 2024
* fix unusedVariable warning

Signed-off-by: Ryuta Kambe <[email protected]>

* fix unusedVariable warning

Signed-off-by: Ryuta Kambe <[email protected]>

* fix variableScope warning

Signed-off-by: Ryuta Kambe <[email protected]>

* fix unreadVariable warning

Signed-off-by: Ryuta Kambe <[email protected]>

* fix

Signed-off-by: Ryuta Kambe <[email protected]>

---------

Signed-off-by: Ryuta Kambe <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:system System design and integration. (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.

2 participants