gnrc: 6lowpan-nd: suppress wrong cppcheck warnings
This commit is contained in:
parent
191797bc6b
commit
45cd9ad5c4
@ -142,6 +142,8 @@ kernel_pid_t gnrc_sixlowpan_nd_next_hop_l2addr(uint8_t *l2addr, uint8_t *l2addr_
|
|||||||
#endif
|
#endif
|
||||||
#ifdef MODULE_GNRC_SIXLOWPAN_ND_ROUTER
|
#ifdef MODULE_GNRC_SIXLOWPAN_ND_ROUTER
|
||||||
/* next hop determination: https://tools.ietf.org/html/rfc6775#section-6.5.4 */
|
/* next hop determination: https://tools.ietf.org/html/rfc6775#section-6.5.4 */
|
||||||
|
/* cppcheck-suppress redundantAssignment
|
||||||
|
* This path is only present for a certain configuration */
|
||||||
nc_entry = gnrc_ipv6_nc_get(iface, dst);
|
nc_entry = gnrc_ipv6_nc_get(iface, dst);
|
||||||
#ifdef MODULE_FIB
|
#ifdef MODULE_FIB
|
||||||
if ((next_hop != NULL) && (nc_entry == NULL)) {
|
if ((next_hop != NULL) && (nc_entry == NULL)) {
|
||||||
@ -161,6 +163,8 @@ kernel_pid_t gnrc_sixlowpan_nd_next_hop_l2addr(uint8_t *l2addr, uint8_t *l2addr_
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
/* next hop determination according to: https://tools.ietf.org/html/rfc6775#section-5.6 */
|
/* next hop determination according to: https://tools.ietf.org/html/rfc6775#section-5.6 */
|
||||||
|
/* cppcheck-suppress knownConditionTrueFalse
|
||||||
|
* cppcheck bug: next_hop might be set before */
|
||||||
if ((next_hop == NULL) && ipv6_addr_is_link_local(dst)) { /* prefix is "on-link" */
|
if ((next_hop == NULL) && ipv6_addr_is_link_local(dst)) { /* prefix is "on-link" */
|
||||||
/* multicast is not handled here anyway so we don't need to check that */
|
/* multicast is not handled here anyway so we don't need to check that */
|
||||||
next_hop = dst;
|
next_hop = dst;
|
||||||
@ -175,6 +179,8 @@ kernel_pid_t gnrc_sixlowpan_nd_next_hop_l2addr(uint8_t *l2addr, uint8_t *l2addr_
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* address resolution of next_hop: https://tools.ietf.org/html/rfc6775#section-5.7 */
|
/* address resolution of next_hop: https://tools.ietf.org/html/rfc6775#section-5.7 */
|
||||||
|
/* cppcheck-suppress knownConditionTrueFalse
|
||||||
|
* cppcheck bug: nc_entry might be set before */
|
||||||
if ((nc_entry == NULL) || (next_hop != dst)) {
|
if ((nc_entry == NULL) || (next_hop != dst)) {
|
||||||
/* get if not gotten from previous check */
|
/* get if not gotten from previous check */
|
||||||
nc_entry = gnrc_ipv6_nc_get(iface, next_hop);
|
nc_entry = gnrc_ipv6_nc_get(iface, next_hop);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user