Describe the bug
There are several ROS RCL functions that have returns, but they are not currently used. This is leading to compiler warnings and loss of features that could be useful.
Compiler output
src/micro_ros_bldc.cpp: In function 'void destroyEntities()':
src/micro_ros_bldc.cpp:111:23: warning: ignoring return value of 'rcl_ret_t rcl_publisher_fini(rcl_publisher_t*, rcl_node_t*)', declared with attribute warn_unused_result [-Wunused-result]
rcl_publisher_fini(&angularPositionPublisher, &node);
~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/micro_ros_bldc.cpp:112:19: warning: ignoring return value of 'rcl_ret_t rcl_timer_fini(rcl_timer_t*)', declared with attribute warn_unused_result [-Wunused-result]
rcl_timer_fini(&angularPositionTimer);
~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
src/micro_ros_bldc.cpp:113:19: warning: ignoring return value of 'rcl_ret_t rcl_timer_fini(rcl_timer_t*)', declared with attribute warn_unused_result [-Wunused-result]
rcl_timer_fini(&neopixelTimer);
~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
src/micro_ros_bldc.cpp:114:21: warning: ignoring return value of 'rcl_ret_t rcl_service_fini(rcl_service_t*, rcl_node_t*)', declared with attribute warn_unused_result [-Wunused-result]
rcl_service_fini(&setTargetService, &node);
~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
src/micro_ros_bldc.cpp:116:18: warning: ignoring return value of 'rcl_ret_t rcl_node_fini(rcl_node_t*)', declared with attribute warn_unused_result [-Wunused-result]
rcl_node_fini(&node);
Describe the bug There are several ROS RCL functions that have returns, but they are not currently used. This is leading to compiler warnings and loss of features that could be useful.
Compiler output