From 5b988daa83ba5107febb8c93a95b7bdb9fa18164 Mon Sep 17 00:00:00 2001 From: Chris Lalancette Date: Tue, 17 Jan 2023 08:22:53 -0500 Subject: [PATCH] Make sure to add semicolons to the CHECK_TYPE_IDENTIFIER_MATCH. (#658) That way it is an actual C/C++ statement, and we can make minor changes to that macro as needed. Signed-off-by: Chris Lalancette --- rmw_fastrtps_shared_cpp/src/rmw_take.cpp | 4 ++-- rmw_fastrtps_shared_cpp/src/rmw_wait.cpp | 2 +- rmw_fastrtps_shared_cpp/src/rmw_wait_set.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/rmw_fastrtps_shared_cpp/src/rmw_take.cpp b/rmw_fastrtps_shared_cpp/src/rmw_take.cpp index ec0d04152..7a14b4e07 100644 --- a/rmw_fastrtps_shared_cpp/src/rmw_take.cpp +++ b/rmw_fastrtps_shared_cpp/src/rmw_take.cpp @@ -79,7 +79,7 @@ _take( RMW_CHECK_TYPE_IDENTIFIERS_MATCH( subscription handle, subscription->implementation_identifier, identifier, - return RMW_RET_INCORRECT_RMW_IMPLEMENTATION) + return RMW_RET_INCORRECT_RMW_IMPLEMENTATION); auto info = static_cast(subscription->data); RCUTILS_CHECK_FOR_NULL_WITH_MSG(info, "custom subscriber info is null", return RMW_RET_ERROR); @@ -301,7 +301,7 @@ _take_serialized_message( RMW_CHECK_TYPE_IDENTIFIERS_MATCH( subscription handle, subscription->implementation_identifier, identifier, - return RMW_RET_INCORRECT_RMW_IMPLEMENTATION) + return RMW_RET_INCORRECT_RMW_IMPLEMENTATION); auto info = static_cast(subscription->data); RCUTILS_CHECK_FOR_NULL_WITH_MSG(info, "custom subscriber info is null", return RMW_RET_ERROR); diff --git a/rmw_fastrtps_shared_cpp/src/rmw_wait.cpp b/rmw_fastrtps_shared_cpp/src/rmw_wait.cpp index d73c4cba5..4f18281de 100644 --- a/rmw_fastrtps_shared_cpp/src/rmw_wait.cpp +++ b/rmw_fastrtps_shared_cpp/src/rmw_wait.cpp @@ -47,7 +47,7 @@ __rmw_wait( RMW_CHECK_TYPE_IDENTIFIERS_MATCH( wait set handle, wait_set->implementation_identifier, identifier, - return RMW_RET_INCORRECT_RMW_IMPLEMENTATION) + return RMW_RET_INCORRECT_RMW_IMPLEMENTATION); // If wait_set_info is ever nullptr, it can only mean one of three things: // - Wait set is invalid. Caller did not respect preconditions. diff --git a/rmw_fastrtps_shared_cpp/src/rmw_wait_set.cpp b/rmw_fastrtps_shared_cpp/src/rmw_wait_set.cpp index b706a5006..3a8ba07a3 100644 --- a/rmw_fastrtps_shared_cpp/src/rmw_wait_set.cpp +++ b/rmw_fastrtps_shared_cpp/src/rmw_wait_set.cpp @@ -80,7 +80,7 @@ __rmw_destroy_wait_set(const char * identifier, rmw_wait_set_t * wait_set) RMW_CHECK_TYPE_IDENTIFIERS_MATCH( wait set handle, wait_set->implementation_identifier, identifier, - return RMW_RET_INCORRECT_RMW_IMPLEMENTATION) + return RMW_RET_INCORRECT_RMW_IMPLEMENTATION); auto result = RMW_RET_OK; // If wait_set_info is ever nullptr, it can only mean one of three things: