Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ros2 compilation warnings #4532

Merged
merged 2 commits into from
Jun 1, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
fix -Wformat warnings
  • Loading branch information
alonfaraj committed May 19, 2022
commit 94c6aa1dcc34beca441a3490a4ce7712bfd27ea4
8 changes: 4 additions & 4 deletions ros2/src/airsim_ros_pkgs/src/airsim_ros_wrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ void AirsimROSWrapper::initialize_airsim()
}
catch (rpc::rpc_error& e) {
std::string msg = e.get_error().as<std::string>();
RCLCPP_ERROR(nh_->get_logger(), "Exception raised by the API, something went wrong.\n%s", msg);
RCLCPP_ERROR(nh_->get_logger(), "Exception raised by the API, something went wrong.\n%s", msg.c_str());
rclcpp::shutdown();
}
}
Expand Down Expand Up @@ -925,7 +925,7 @@ void AirsimROSWrapper::drone_state_timer_cb()
}
catch (rpc::rpc_error& e) {
std::string msg = e.get_error().as<std::string>();
RCLCPP_ERROR(nh_->get_logger(), "Exception raised by the API:\n%s", msg);
RCLCPP_ERROR(nh_->get_logger(), "Exception raised by the API:\n%s", msg.c_str());
}
}

Expand Down Expand Up @@ -1234,7 +1234,7 @@ void AirsimROSWrapper::img_response_timer_cb()

catch (rpc::rpc_error& e) {
std::string msg = e.get_error().as<std::string>();
RCLCPP_ERROR(nh_->get_logger(), "Exception raised by the API, didn't get image response.\n%s", msg);
RCLCPP_ERROR(nh_->get_logger(), "Exception raised by the API, didn't get image response.\n%s", msg.c_str());
}
}

Expand All @@ -1253,7 +1253,7 @@ void AirsimROSWrapper::lidar_timer_cb()
}
catch (rpc::rpc_error& e) {
std::string msg = e.get_error().as<std::string>();
RCLCPP_ERROR(nh_->get_logger(), "Exception raised by the API, didn't get image response.\n%s", msg);
RCLCPP_ERROR(nh_->get_logger(), "Exception raised by the API, didn't get image response.\n%s", msg.c_str());
}
}

Expand Down