Skip to content

Commit a617893

Browse files
authored
Fix format string warnings (#634)
Recent changes to the rclcpp logging macros exposed a couple bugs. Signed-off-by: Jacob Perron <[email protected]>
1 parent 79162b2 commit a617893

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/ros_robot_localization_listener.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ RosRobotLocalizationListener::RosRobotLocalizationListener(
114114
if (process_noise_covar_config.size() != STATE_SIZE * STATE_SIZE) {
115115
RCLCPP_ERROR(
116116
node_logger_->get_logger(),
117-
"ERROR unexpected process noise covariance matrix size (%d)",
117+
"ERROR unexpected process noise covariance matrix size (%ld)",
118118
process_noise_covar_config.size());
119119
}
120120

@@ -429,8 +429,8 @@ bool RosRobotLocalizationListener::getState(
429429
if (!findAncestor(tf_buffer_, frame_id, base_frame_id_) ) {
430430
RCLCPP_ERROR(
431431
node_logger_->get_logger(),
432-
"You are trying to get the state of , but this frame is not a child of the "
433-
"base frame: .", frame_id.c_str(), base_frame_id_.c_str());
432+
"You are trying to get the state of %s, but this frame is not a child of the "
433+
"base frame: %s.", frame_id.c_str(), base_frame_id_.c_str());
434434
return false;
435435
}
436436
} catch (const tf2::TransformException & e) {

0 commit comments

Comments
 (0)