Skip to content

Suppress cppcheck errors from macros from version.h#2346

Merged
christophfroehlich merged 3 commits intomasterfrom
fix-cppcheck
May 7, 2026
Merged

Suppress cppcheck errors from macros from version.h#2346
christophfroehlich merged 3 commits intomasterfrom
fix-cppcheck

Conversation

@christophfroehlich
Copy link
Copy Markdown
Member

Should fix


ament_cppcheck...........................................................Failed
- hook id: ament_cppcheck
- exit code: 1

[force_torque_sensor_broadcaster/test/test_wrench_transformer.cpp:35]: (error: syntaxError) failed to evaluate #if condition, undefined function-like macro invocation: RCLCPP_VERSION_GTE( ... )
[joint_state_broadcaster/include/joint_state_broadcaster/joint_state_broadcaster.hpp:29]: (error: syntaxError) failed to evaluate #if condition, undefined function-like macro invocation: RCLCPP_VERSION_GTE( ... )
2 errors
[joint_trajectory_controller/src/joint_trajectory_controller.cpp:38]: (error: syntaxError) failed to evaluate #if condition, undefined function-like macro invocation: RCLCPP_VERSION_GTE( ... )
[admittance_controller/test/test_admittance_controller.hpp:39]: (error: syntaxError) failed to evaluate #if condition, undefined function-like macro invocation: RCLCPP_VERSION_GTE( ... )
2 errors
No problems found
[admittance_controller/test/test_admittance_controller.hpp:39]: (error: syntaxError) failed to evaluate #if condition, undefined function-like macro invocation: RCLCPP_VERSION_GTE( ... )
1 errors

https://github.com/ros-controls/ros2_controllers/actions/runs/25400217669/job/74497477883

@christophfroehlich christophfroehlich marked this pull request as draft May 6, 2026 20:49
@christophfroehlich christophfroehlich changed the title Guard the macros from version.h for ament_cppcheck Fix cppcheck errors from macros from version.h May 7, 2026
@christophfroehlich christophfroehlich changed the title Fix cppcheck errors from macros from version.h Suppress cppcheck errors from macros from version.h May 7, 2026
@christophfroehlich christophfroehlich marked this pull request as ready for review May 7, 2026 08:13
@christophfroehlich christophfroehlich added backport-jazzy Triggers PR backport to ROS 2 jazzy. backport-kilted Triggers PR backport to ROS 2 kilted. labels May 7, 2026
@christophfroehlich christophfroehlich merged commit 4a25b8c into master May 7, 2026
11 of 20 checks passed
@christophfroehlich christophfroehlich deleted the fix-cppcheck branch May 7, 2026 08:14
saikishor pushed a commit that referenced this pull request May 7, 2026
…2348)

Co-authored-by: Christoph Fröhlich <christophfroehlich@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-jazzy Triggers PR backport to ROS 2 jazzy. backport-kilted Triggers PR backport to ROS 2 kilted.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant