Repository navigation
Use -Wpedantic - #189
Merged
Merged
Use -Wpedantic#189
Conversation
wjwwood
approved these changes
Feb 28, 2017
| for (auto received : received_messages) { | ||
| if (!received) { | ||
| for (auto received_msg : received_messages) { | ||
| if (!received_msg) { |
Member
Author
There was a problem hiding this comment.
Actually I think that was not a pedantic warning but a windows warning when I was trying less permissive flags. I think it's because it is shadowing the variable of the same name defined line 39
| }); | ||
|
|
||
| rcl_wait_set_t wait_set = rcl_get_zero_initialized_wait_set(); | ||
| wait_set = rcl_get_zero_initialized_wait_set(); |
Member
There was a problem hiding this comment.
Would it be better/possible to narrow the scope above to avoid the shadowing (I assume that was the issue here)?
dirk-thomas
reviewed
Feb 28, 2017
| EXPECT_EQ(0, strcmp(rcl_subscription_get_topic_name(&subscription), topic_name)); | ||
|
|
||
| rcl_wait_set_t wait_set = rcl_get_zero_initialized_wait_set(); | ||
| rcl_wait_set_t wait_set_connection = rcl_get_zero_initialized_wait_set(); |
Member
There was a problem hiding this comment.
Why adding _connection to this variable? How is the wait set related to a "connection"?
Instead the block could be wrapped in a local scope to avoid the colliding variable name.
Member
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See ros2/ros2#305