Skip to content

Commit

Permalink
Fix format-security warning with clang. (#663)
Browse files Browse the repository at this point in the history
In particular, make sure to use a "%s" format string.

Signed-off-by: Chris Lalancette <clalancette@gmail.com>
  • Loading branch information
clalancette authored Jan 2, 2024
1 parent 9918a14 commit 85c0f3a
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ class FibonacciActionClient : public rclcpp::Node
for (auto number : feedback->partial_sequence) {
ss << number << " ";
}
RCLCPP_INFO(this->get_logger(), ss.str().c_str());
RCLCPP_INFO(this->get_logger(), "%s", ss.str().c_str());
};

send_goal_options.result_callback = [this](
Expand All @@ -110,7 +110,7 @@ class FibonacciActionClient : public rclcpp::Node
for (auto number : result.result->sequence) {
ss << number << " ";
}
RCLCPP_INFO(this->get_logger(), ss.str().c_str());
RCLCPP_INFO(this->get_logger(), "%s", ss.str().c_str());
rclcpp::shutdown();
};

Expand Down

0 comments on commit 85c0f3a

Please sign in to comment.