Skip to content

use string_array_t from c_utilities package - #118

Merged
Karsten1987 merged 5 commits into
masterfrom
utilities_string_array
Apr 14, 2017
Merged

Karsten1987 merged 5 commits into
masterfrom
utilities_string_array

Conversation

@Karsten1987

@Karsten1987 Karsten1987 commented Apr 11, 2017 •

Copy link
Copy Markdown
Contributor

connects to ros2/rmw#100

@Karsten1987 Karsten1987 self-assigned this Apr 11, 2017
@Karsten1987 Karsten1987 added the in progress Actively being worked on (Kanban column) label Apr 11, 2017
Comment thread rcl/include/rcl/graph.h
@@ -112,13 +106,7 @@ RCL_WARN_UNUSED
rcl_ret_t
rcl_get_node_names(

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While you're here, please add some documentation for this function.

ret = rcl_destroy_node_names(&node_names);
EXPECT_EQ(RCL_RET_OK, ret) << rcl_get_error_string_safe();
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do these tests not need to stay? And maybe be extended to actually check the contents of the node names listed? Or is that tested elsewhere (maybe system tests)?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh ok, I didn't notice the other tests in the file. Looks good, sorry for the noise.

@mikaelarguedas mikaelarguedas changed the title use c_utilities package use string_array_t from c_utilities package Apr 12, 2017

@wjwwood wjwwood left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, other than a comment.

I touched up the docs in 462587b, @Karsten1987 please have a look at that and see if it is right.

Comment thread rcl/test/rcl/test_get_node_names.cpp Outdated
EXPECT_EQ(0, strcmp(node1_name, node_names.data[0]));
EXPECT_EQ(0, strcmp(node2_name, node_names.data[1]));

utilities_string_array_fini(&node_names);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has a return code, I think you ought to check it. It's related to my comment about this function needing the "warn unused" attribute applied to it.

@Karsten1987
Karsten1987 merged commit 08d9763 into master Apr 14, 2017
@Karsten1987
Karsten1987 deleted the utilities_string_array branch April 14, 2017 23:18
@Karsten1987 Karsten1987 removed the in progress Actively being worked on (Kanban column) label Apr 14, 2017
emersonknapp pushed a commit to aws-ros-dev/rcl that referenced this pull request Jun 3, 2019
ivanpauno pushed a commit that referenced this pull request Jan 2, 2020
* Make the TOPIC and NAMESPACE macros unsigned.

This is more correct; they can never be negative, as that
doesn't make any sense.  This also fixes some warnings on
mismatched types that get thrown up when adding -Wall -Wextra
to the flags, which this commit also does.

Signed-off-by: Chris Lalancette <[email protected]>

* Add -Wpedantic to the flags.

This also required one more small fix.

Signed-off-by: Chris Lalancette <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants