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

Add semicolons to all RCLCPP and RCUTILS macros. #229

Merged
merged 1 commit into from
Oct 5, 2018
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
10 changes: 5 additions & 5 deletions rmw_fastrtps_cpp/src/rmw_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,14 +145,14 @@ rmw_create_client(

RCUTILS_LOG_DEBUG_NAMED(
"rmw_fastrtps_cpp",
"************ Client Details *********")
"************ Client Details *********");
RCUTILS_LOG_DEBUG_NAMED(
"rmw_fastrtps_cpp",
"Sub Topic %s", subscriberParam.topic.topicName.c_str())
"Sub Topic %s", subscriberParam.topic.topicName.c_str());
RCUTILS_LOG_DEBUG_NAMED(
"rmw_fastrtps_cpp",
"Pub Topic %s", publisherParam.topic.topicName.c_str())
RCUTILS_LOG_DEBUG_NAMED("rmw_fastrtps_cpp", "***********")
"Pub Topic %s", publisherParam.topic.topicName.c_str());
RCUTILS_LOG_DEBUG_NAMED("rmw_fastrtps_cpp", "***********");

// Create Client Subscriber and set QoS
if (!get_datareader_qos(*qos_policies, subscriberParam)) {
Expand Down Expand Up @@ -224,7 +224,7 @@ rmw_create_client(
} else {
RCUTILS_LOG_ERROR_NAMED(
"rmw_fastrtps_cpp",
"leaking type support objects because node impl is null")
"leaking type support objects because node impl is null");
}

delete info;
Expand Down
8 changes: 4 additions & 4 deletions rmw_fastrtps_cpp/src/rmw_service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,14 +157,14 @@ rmw_create_service(

RCUTILS_LOG_DEBUG_NAMED(
"rmw_fastrtps_cpp",
"************ Service Details *********")
"************ Service Details *********");
RCUTILS_LOG_DEBUG_NAMED(
"rmw_fastrtps_cpp",
"Sub Topic %s", subscriberParam.topic.topicName.c_str())
"Sub Topic %s", subscriberParam.topic.topicName.c_str());
RCUTILS_LOG_DEBUG_NAMED(
"rmw_fastrtps_cpp",
"Pub Topic %s", publisherParam.topic.topicName.c_str())
RCUTILS_LOG_DEBUG_NAMED("rmw_fastrtps_cpp", "***********")
"Pub Topic %s", publisherParam.topic.topicName.c_str());
RCUTILS_LOG_DEBUG_NAMED("rmw_fastrtps_cpp", "***********");

// Create Service Subscriber and set QoS
if (!get_datareader_qos(*qos_policies, subscriberParam)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,13 @@ struct StringHelper<rosidl_typesupport_introspection_c__MessageMembers>
if (!c_string) {
RCUTILS_LOG_ERROR_NAMED(
"rmw_fastrtps_dynamic_cpp",
"Failed to cast data as rosidl_generator_c__String")
"Failed to cast data as rosidl_generator_c__String");
return current_alignment;
}
if (!c_string->data) {
RCUTILS_LOG_ERROR_NAMED(
"rmw_fastrtps_dynamic_cpp",
"rosidl_generator_c_String had invalid data")
"rosidl_generator_c_String had invalid data");
return current_alignment;
}

Expand All @@ -83,13 +83,13 @@ struct StringHelper<rosidl_typesupport_introspection_c__MessageMembers>
if (!c_string) {
RCUTILS_LOG_ERROR_NAMED(
"rmw_fastrtps_dynamic_cpp",
"Failed to cast data as rosidl_generator_c__String")
"Failed to cast data as rosidl_generator_c__String");
return "";
}
if (!c_string->data) {
RCUTILS_LOG_ERROR_NAMED(
"rmw_fastrtps_dynamic_cpp",
"rosidl_generator_c_String had invalid data")
"rosidl_generator_c_String had invalid data");
return "";
}
return std::string(c_string->data);
Expand Down
10 changes: 5 additions & 5 deletions rmw_fastrtps_dynamic_cpp/src/rmw_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -150,14 +150,14 @@ rmw_create_client(

RCUTILS_LOG_DEBUG_NAMED(
"rmw_fastrtps_dynamic_cpp",
"************ Client Details *********")
"************ Client Details *********");
RCUTILS_LOG_DEBUG_NAMED(
"rmw_fastrtps_dynamic_cpp",
"Sub Topic %s", subscriberParam.topic.topicName.c_str())
"Sub Topic %s", subscriberParam.topic.topicName.c_str());
RCUTILS_LOG_DEBUG_NAMED(
"rmw_fastrtps_dynamic_cpp",
"Pub Topic %s", publisherParam.topic.topicName.c_str())
RCUTILS_LOG_DEBUG_NAMED("rmw_fastrtps_dynamic_cpp", "***********")
"Pub Topic %s", publisherParam.topic.topicName.c_str());
RCUTILS_LOG_DEBUG_NAMED("rmw_fastrtps_dynamic_cpp", "***********");

// Create Client Subscriber and set QoS
if (!get_datareader_qos(*qos_policies, subscriberParam)) {
Expand Down Expand Up @@ -229,7 +229,7 @@ rmw_create_client(
} else {
RCUTILS_LOG_ERROR_NAMED(
"rmw_fastrtps_dynamic_cpp",
"leaking type support objects because node impl is null")
"leaking type support objects because node impl is null");
}

delete info;
Expand Down
8 changes: 4 additions & 4 deletions rmw_fastrtps_dynamic_cpp/src/rmw_service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -162,14 +162,14 @@ rmw_create_service(

RCUTILS_LOG_DEBUG_NAMED(
"rmw_fastrtps_dynamic_cpp",
"************ Service Details *********")
"************ Service Details *********");
RCUTILS_LOG_DEBUG_NAMED(
"rmw_fastrtps_dynamic_cpp",
"Sub Topic %s", subscriberParam.topic.topicName.c_str())
"Sub Topic %s", subscriberParam.topic.topicName.c_str());
RCUTILS_LOG_DEBUG_NAMED(
"rmw_fastrtps_dynamic_cpp",
"Pub Topic %s", publisherParam.topic.topicName.c_str())
RCUTILS_LOG_DEBUG_NAMED("rmw_fastrtps_dynamic_cpp", "***********")
"Pub Topic %s", publisherParam.topic.topicName.c_str());
RCUTILS_LOG_DEBUG_NAMED("rmw_fastrtps_dynamic_cpp", "***********");

// Create Service Subscriber and set QoS
if (!get_datareader_qos(*qos_policies, subscriberParam)) {
Expand Down
8 changes: 4 additions & 4 deletions rmw_fastrtps_shared_cpp/src/demangle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ _demangle_service_from_topic(const std::string & topic_name)
if (topic_name.length() - suffix_position - suffix.length() != 0) {
RCUTILS_LOG_WARN_NAMED("rmw_fastrtps_shared_cpp",
"service topic has service prefix and a suffix, but not at the end"
", report this: '%s'", topic_name.c_str())
", report this: '%s'", topic_name.c_str());
continue;
}
found_suffix = suffix;
Expand All @@ -92,7 +92,7 @@ _demangle_service_from_topic(const std::string & topic_name)
if (std::string::npos == suffix_position) {
RCUTILS_LOG_WARN_NAMED("rmw_fastrtps_shared_cpp",
"service topic has prefix but no suffix"
", report this: '%s'", topic_name.c_str())
", report this: '%s'", topic_name.c_str());
return "";
}
// strip off the suffix first
Expand Down Expand Up @@ -124,7 +124,7 @@ _demangle_service_type_only(const std::string & dds_type_name)
if (dds_type_name.length() - suffix_position - suffix.length() != 0) {
RCUTILS_LOG_WARN_NAMED("rmw_fastrtps_shared_cpp",
"service type contains '::srv::dds_::' and a suffix, but not at the end"
", report this: '%s'", dds_type_name.c_str())
", report this: '%s'", dds_type_name.c_str());
continue;
}
found_suffix = suffix;
Expand All @@ -134,7 +134,7 @@ _demangle_service_type_only(const std::string & dds_type_name)
if (std::string::npos == suffix_position) {
RCUTILS_LOG_WARN_NAMED("rmw_fastrtps_shared_cpp",
"service type contains '::srv::dds_::' but does not have a suffix"
", report this: '%s'", dds_type_name.c_str())
", report this: '%s'", dds_type_name.c_str());
return "";
}
// everything checks out, reformat it from '<pkg>::srv::dds_::<type><suffix>' to '<pkg>/<type>'
Expand Down
4 changes: 2 additions & 2 deletions rmw_fastrtps_shared_cpp/src/rmw_count.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ __rmw_count_publishers(
RCUTILS_LOG_DEBUG_NAMED(
"rmw_fastrtps_shared_cpp",
"looking for subscriber topic: %s, number of matches: %zu",
topic_name, *count)
topic_name, *count);

return RMW_RET_OK;
}
Expand Down Expand Up @@ -132,7 +132,7 @@ __rmw_count_subscribers(
RCUTILS_LOG_DEBUG_NAMED(
"rmw_fastrtps_shared_cpp",
"looking for subscriber topic: %s, number of matches: %zu",
topic_name, *count)
topic_name, *count);

return RMW_RET_OK;
}
Expand Down
2 changes: 1 addition & 1 deletion rmw_fastrtps_shared_cpp/src/rmw_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ create_node(
if (ret != RMW_RET_OK) {
RCUTILS_LOG_ERROR_NAMED(
"rmw_fastrtps_shared_cpp",
"failed to destroy guard condition during error handling")
"failed to destroy guard condition during error handling");
}
}
rmw_free(listener);
Expand Down
4 changes: 2 additions & 2 deletions rmw_fastrtps_shared_cpp/src/rmw_node_names.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ __rmw_get_node_names(
if (rcutils_ret != RCUTILS_RET_OK) {
RCUTILS_LOG_ERROR_NAMED(
"rmw_connext_cpp",
"failed to cleanup during error handling: %s", rcutils_get_error_string_safe())
"failed to cleanup during error handling: %s", rcutils_get_error_string_safe());
rcutils_reset_error();
}
}
Expand All @@ -106,7 +106,7 @@ __rmw_get_node_names(
if (rcutils_ret != RCUTILS_RET_OK) {
RCUTILS_LOG_ERROR_NAMED(
"rmw_connext_cpp",
"failed to cleanup during error handling: %s", rcutils_get_error_string_safe())
"failed to cleanup during error handling: %s", rcutils_get_error_string_safe());
rcutils_reset_error();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ __rmw_get_service_names_and_types(
if (rmw_ret != RMW_RET_OK) {
RCUTILS_LOG_ERROR_NAMED(
"rmw_fastrtps_shared_cpp",
"error during report of error: %s", rmw_get_error_string_safe())
"error during report of error: %s", rmw_get_error_string_safe());
}
};
// For each service, store the name, initialize the string array for types, and store all types
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ __rmw_get_topic_names_and_types(
if (rmw_ret != RMW_RET_OK) {
RCUTILS_LOG_ERROR_NAMED(
"rmw_fastrtps_shared_cpp",
"error during report of error: %s", rmw_get_error_string_safe())
"error during report of error: %s", rmw_get_error_string_safe());
}
};
// Setup demangling functions based on no_demangle option
Expand Down