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 some compilation warnings generated by: node-gyp rebuild #734

Merged
merged 2 commits into from
Nov 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
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
13 changes: 11 additions & 2 deletions src/rcl_action_bindings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -629,9 +629,18 @@ NAN_METHOD(ActionProcessCancelRequest) {
rcl_ret_t ret = rcl_action_process_cancel_request(
action_server, cancel_request, cancel_response_ptr);
if (ret != RCL_RET_OK) {
rcl_action_cancel_response_fini(cancel_response_ptr);
Nan::ThrowError(rcl_get_error_string().str);
// fetch the error triggered by rcl_action_process_cancel_request
rcutils_error_string_t cancel_error = rcl_get_error_string();
rcl_reset_error();
rcl_ret_t ret_fini = rcl_action_cancel_response_fini(cancel_response_ptr);
if (ret_fini != RCL_RET_OK) {
RCUTILS_LOG_WARN_NAMED(
PACKAGE_NAME,
"There was an error finalizing the action cancel response: %s",
rcl_get_error_string().str);
rcl_reset_error();
}
Nan::ThrowError(cancel_error.str);
info.GetReturnValue().Set(Nan::Undefined());
return;
}
Expand Down
1 change: 0 additions & 1 deletion src/rcl_bindings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1195,7 +1195,6 @@ const rmw_qos_profile_t* GetQoSProfileFromString(const std::string& profile) {

std::unique_ptr<rmw_qos_profile_t> GetQosProfileFromObject(
v8::Local<v8::Object> object) {
v8::Local<v8::Context> currentContent = Nan::GetCurrentContext();
std::unique_ptr<rmw_qos_profile_t> qos_profile =
std::make_unique<rmw_qos_profile_t>();

Expand Down