Skip to content

Commit a578674

Browse files
authored
Fix -Wreturn-local-addr compiler warning (ros-controls#2628) (ros-controls#2631)
1 parent 2c186d2 commit a578674

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

controller_interface/src/controller_interface_base.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -194,12 +194,10 @@ const rclcpp_lifecycle::State & ControllerInterfaceBase::configure()
194194
async_params.initialize(node_, "async_parameters.");
195195
if (async_params.scheduling_policy == realtime_tools::AsyncSchedulingPolicy::DETACHED)
196196
{
197-
const rclcpp_lifecycle::State unconfigured_state(
198-
lifecycle_msgs::msg::State::PRIMARY_STATE_UNCONFIGURED, "unconfigured");
199197
RCLCPP_ERROR(
200198
get_node()->get_logger(),
201199
"The controllers are not supported to run asynchronously in detached mode!");
202-
return unconfigured_state;
200+
return get_node()->get_current_state();
203201
}
204202
RCLCPP_INFO(
205203
get_node()->get_logger(), "Starting async handler with scheduler priority: %d",

0 commit comments

Comments
 (0)