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

Add few warning compiler options to error (backport #1181) #1816

Merged
merged 2 commits into from
Oct 27, 2024

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Oct 26, 2024

Inspiring from the PRs that @destogl made recently: #1173 & #1174. I think it is in the best interest of everyone to add some compiler flags to errors to better code quality. I have done it for the most important packages and fixed some errors at the same time


This is an automatic backport of pull request #1181 done by Mergify.

Copy link
Contributor Author

mergify bot commented Oct 26, 2024

Cherry-pick of 65353ff has failed:

On branch mergify/bp/humble/pr-1181
Your branch is up to date with 'origin/humble'.

You are currently cherry-picking commit 65353ff.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   hardware_interface/src/mock_components/generic_system.cpp

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   controller_interface/CMakeLists.txt
	both modified:   controller_manager/CMakeLists.txt
	both modified:   controller_manager/src/controller_manager.cpp
	both modified:   hardware_interface/CMakeLists.txt
	both modified:   hardware_interface_testing/test/test_resource_manager.cpp
	both modified:   joint_limits/CMakeLists.txt
	both modified:   transmission_interface/CMakeLists.txt

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

* add conversion, unused-but-set-variable, and return-type warnings to error
* add shadow variables to error and their fixes for code compilation
* apply the same flags to controller interface package
* apply the same flags and their fixes to hardware_interface package
* apply the same compiler options to the rest of the packages
Copy link

codecov bot commented Oct 26, 2024

Codecov Report

Attention: Patch coverage is 50.00000% with 18 lines in your changes missing coverage. Please review.

Project coverage is 62.57%. Comparing base (24fcfe7) to head (bb6e50f).
Report is 1 commits behind head on humble.

Files with missing lines Patch % Lines
controller_manager/src/controller_manager.cpp 54.54% 9 Missing and 1 partial ⚠️
...e_interface_testing/test/test_resource_manager.cpp 20.00% 0 Missing and 8 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           humble    #1816      +/-   ##
==========================================
- Coverage   62.58%   62.57%   -0.01%     
==========================================
  Files         108      108              
  Lines       12027    12024       -3     
  Branches     8129     8131       +2     
==========================================
- Hits         7527     7524       -3     
  Misses        880      880              
  Partials     3620     3620              
Flag Coverage Δ
unittests 62.57% <50.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...e_interface/src/mock_components/generic_system.cpp 80.00% <100.00%> (ø)
...e_interface_testing/test/test_resource_manager.cpp 64.43% <20.00%> (ø)
controller_manager/src/controller_manager.cpp 66.49% <54.54%> (-0.09%) ⬇️

Copy link
Contributor

@christophfroehlich christophfroehlich left a comment

Choose a reason for hiding this comment

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

This fixes #1588 locally for me (don't ask me why).

Copy link
Member

@saikishor saikishor left a comment

Choose a reason for hiding this comment

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

LGTM

@christophfroehlich christophfroehlich merged commit 03bf04b into humble Oct 27, 2024
10 of 11 checks passed
@christophfroehlich christophfroehlich deleted the mergify/bp/humble/pr-1181 branch October 27, 2024 16:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants