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) #1817

Closed
wants to merge 2 commits into from

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.

@mergify mergify bot added the conflicts label Oct 26, 2024
Copy link
Contributor Author

mergify bot commented Oct 26, 2024

Cherry-pick of 65353ff has failed:

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

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:   controller_interface/CMakeLists.txt
	modified:   controller_manager/CMakeLists.txt
	modified:   hardware_interface/CMakeLists.txt
	modified:   hardware_interface/src/mock_components/generic_system.cpp
	modified:   joint_limits/CMakeLists.txt
	modified:   transmission_interface/CMakeLists.txt

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

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
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 #1589 locally for me (don't ask me why).

Comment on lines +459 to +460
testing::Eq(controller_update_rate * no_of_secs_passed),
testing::Eq((controller_update_rate * no_of_secs_passed) - 1)));
Copy link
Member

Choose a reason for hiding this comment

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

@christophfroehlich I'm not sure if this should be with -1 or +1

Copy link
Contributor

Choose a reason for hiding this comment

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

I copied that from here, why do we expect a different value here? and yes, the tests fail..

@saikishor
Copy link
Member

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

Could be from shadow variables?

BTW the tests are failing in the jobs

@christophfroehlich
Copy link
Contributor

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

Could be from shadow variables?

No, something with doxygen.

@christophfroehlich
Copy link
Contributor

better not fight a soon EOL distro ;)

@christophfroehlich christophfroehlich deleted the mergify/bp/iron/pr-1181 branch November 4, 2024 19:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants