-
Notifications
You must be signed in to change notification settings - Fork 2k
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
tests/gnrc_ipv6_nib: Fix unused function error w/ clang/macOS #7910
tests/gnrc_ipv6_nib: Fix unused function error w/ clang/macOS #7910
Conversation
_is_reachable is only used when GNRC_IPV6_NIB_CONF_ARSM is enabled, and as such it must be guarded so that clang doesn't complain about a unused function in case GNRC_IPV6_NIB_CONF_ARSM is not set Similar to RIOT-OS#7910 Relates to 6473
In accordance to refactoring work on GNRC and the current merge embargo for GNRC, can you rebase this branch against gnrc_netif2_integration/master and change this PR to that base branch, please? |
Ping @x3ro? |
This means that this PR cannot be solved for master until your working branch is merged? |
but in general yes! There currently is a merge embargo on GNRC [edit]in master (this is why the review and testing of all PRs related to #7925 should have been started last week)[/edit]. Please read my mail on devel regarding this. |
I know about the embargo, just wanted to know if a "small" change to fix a bug in the existing implementation would remain a bug until the new netif gets merged. Thus, I guess that we will live with this at least until the next release. |
No, not even bugfixes (to master, but again: this PR is not supposed to go into master). The point is to keep the chance of merge conflicts as low as possible.
Well the plan was, that the netif stuff is merged into master again end of this week, but since no reviews happend last week (and we are thus 3 days after schedule) I really don't think that will be the case. |
Let's cross fingers for end of next week ;-) |
Ok great! I'll try to help. |
_is_reachable is only used when GNRC_IPV6_NIB_CONF_ARSM is enabled, and as such it must be guarded so that clang doesn't complain about a unused function in case GNRC_IPV6_NIB_CONF_ARSM is not set Similar to RIOT-OS#7910 Relates to 6473
In the case that GNRC_IPV6_NIB_CONF_ARSM is set but GNRC_IPV6_NIB_CONF_6LN is not, clang complains about the function _get_l2addr_from_ipv6 never being used. I couldn't easily figure out why this passes in Murdock, but I'm guessing that clang is simply being smarter than GCC. Can someone comment on whether there is a better fix for this? Relates to RIOT-OS#6473
45cf1b0
to
069849f
Compare
Done |
@x3ro Is there a reason for the WIP in the title? |
@@ -290,6 +290,9 @@ void _nib_nc_get(const _nib_onl_entry_t *node, gnrc_ipv6_nib_nc_t *nce) | |||
return; | |||
} | |||
} | |||
#else | |||
/* Prevent unused function error thrown by clang */ | |||
(void)_get_l2addr_from_ipv6; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you put the _get_l2addr_from_ipv6()
function into GNRC_IPV6_NIB_CONF_6LN
conditional as well, instead, please?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK. I reallize now that this this is not possible, since it is also used in the else case of the GNRC_IPV6_NIB_CONF_ARSM
case. Then let's go with this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK
_is_reachable is only used when GNRC_IPV6_NIB_CONF_ARSM is enabled, and as such it must be guarded so that clang doesn't complain about a unused function in case GNRC_IPV6_NIB_CONF_ARSM is not set Similar to RIOT-OS#7910 Relates to 6473
_is_reachable is only used when GNRC_IPV6_NIB_CONF_ARSM is enabled, and as such it must be guarded so that clang doesn't complain about a unused function in case GNRC_IPV6_NIB_CONF_ARSM is not set Similar to RIOT-OS#7910 Relates to 6473
In the case that GNRC_IPV6_NIB_CONF_ARSM is set but
GNRC_IPV6_NIB_CONF_6LN is not, clang complains about
the function _get_l2addr_from_ipv6 never being used.
I couldn't easily figure out why this passes in Murdock,
but I'm guessing that clang is simply being smarter than
GCC. Can someone comment on whether there is a better fix
for this?
Relates to #6473