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 unknown macro errors reported by cppcheck 1.90 #1000

Merged
merged 1 commit into from
Mar 4, 2020

Conversation

jacobperron
Copy link
Member

It was complaining about an unknown macro RCLCPP_SMART_PTR_DEFINITIONS.
Passing rclcpp include directories to cppcheck resolves the errors
reported in rclcpp_action and rclcpp_lifecycle.

@jacobperron jacobperron self-assigned this Feb 25, 2020
@jacobperron jacobperron added the bug Something isn't working label Feb 25, 2020
@jacobperron
Copy link
Member Author

Example failure from our nightly build on Focal: http://build.ros2.org/view/Fci/job/Fci__nightly-fastrtps_ubuntu_focal_amd64/38/testReport/

@jacobperron
Copy link
Member Author

jacobperron commented Feb 25, 2020

  • Linux Build Status
  • Linux-aarch64 Build Status
  • macOS Build Status
  • Windows Build Status
  • Windows-container Build Status

@jacobperron
Copy link
Member Author

jacobperron commented Feb 26, 2020

CI is running into Python exceptions coming from ament_cppcheck (but only on Linux builds). I didn't run into these locally 🤔

Edit: okay, I can repro. Looking into it.

@jacobperron
Copy link
Member Author

There is a bug in ament_cppcheck. See ament/ament_lint#216 for a fix.

@jacobperron
Copy link
Member Author

I don't know why cppcheck is happy on Windows and macOS... I guess it must simply be a difference in versions.

@jacobperron
Copy link
Member Author

Fixed a cppcheck error in rclcpp (222f3b8).

I don't know why the error is not reported when testing rclcpp. It only shows up transitively in rclcpp_action and rclcpp_lifecycle.

@jacobperron
Copy link
Member Author

macOS: Build Status

@jacobperron
Copy link
Member Author

jacobperron commented Mar 2, 2020

I've cleaned up the commits:

  • Linux Build Status
  • Linux-aarch64 Build Status
  • macOS Build Status
  • Windows Build Status
  • Windows-container Build Status

@dirk-thomas
Copy link
Member

dirk-thomas commented Mar 2, 2020

The second commit doesn't match the PR title. Either split or update the PR title.

@jacobperron
Copy link
Member Author

Split second commit out in #1011

@dirk-thomas
Copy link
Member

Split second commit out in #1011

This PR has still both commits.

@jacobperron
Copy link
Member Author

I'll rebase this once the other has merged, since CI depends on it.

It was complaining about an unknown macro RCLCPP_SMART_PTR_DEFINITIONS.
Passing rclcpp include directories to cppcheck resolves the errors
reported in rclcpp_action and rclcpp_lifecycle.

Signed-off-by: Jacob Perron <jacob@openrobotics.org>
@jacobperron
Copy link
Member Author

@dirk-thomas rebased.

@jacobperron jacobperron merged commit e3949cb into master Mar 4, 2020
@delete-merged-branch delete-merged-branch bot deleted the jacob/cppcheck_macro_errors branch March 4, 2020 17:05
@ros-discourse
Copy link

This pull request has been mentioned on ROS Discourse. There might be relevant details there:

https://discourse.ros.org/t/windows-ci-builds-are-now-officially-containerized-and-virtualized-on-ci-ros2-org/13099/1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants