Skip to content

Fix unknown macro errors reported by cppcheck 1.90#1000

Merged
jacobperron merged 1 commit intomasterfrom
jacob/cppcheck_macro_errors
Mar 4, 2020
Merged

Fix unknown macro errors reported by cppcheck 1.90#1000
jacobperron merged 1 commit intomasterfrom
jacob/cppcheck_macro_errors

Conversation

@jacobperron
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Member Author

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

@jacobperron
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Member Author

macOS: Build Status

@jacobperron
Copy link
Copy Markdown
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

@jacobperron jacobperron requested a review from dirk-thomas March 2, 2020 22:23
@dirk-thomas
Copy link
Copy Markdown
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
Copy Markdown
Member Author

Split second commit out in #1011

@dirk-thomas
Copy link
Copy Markdown
Member

Split second commit out in #1011

This PR has still both commits.

@jacobperron
Copy link
Copy Markdown
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 jacobperron force-pushed the jacob/cppcheck_macro_errors branch from ca1af29 to 244ea20 Compare March 3, 2020 17:29
@jacobperron
Copy link
Copy Markdown
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
Copy Markdown

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.

3 participants