Skip to content

Commit

Permalink
Make sure to add semicolons to the CHECK_TYPE_IDENTIFIER_MATCH. (ros2…
Browse files Browse the repository at this point in the history
…#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 <[email protected]>
  • Loading branch information
clalancette authored Jan 17, 2023
1 parent 19d141d commit 5b988da
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions rmw_fastrtps_shared_cpp/src/rmw_take.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<CustomSubscriberInfo *>(subscription->data);
RCUTILS_CHECK_FOR_NULL_WITH_MSG(info, "custom subscriber info is null", return RMW_RET_ERROR);
Expand Down Expand Up @@ -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<CustomSubscriberInfo *>(subscription->data);
RCUTILS_CHECK_FOR_NULL_WITH_MSG(info, "custom subscriber info is null", return RMW_RET_ERROR);
Expand Down
2 changes: 1 addition & 1 deletion rmw_fastrtps_shared_cpp/src/rmw_wait.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion rmw_fastrtps_shared_cpp/src/rmw_wait_set.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 5b988da

Please sign in to comment.