From: Donald Sharp Date: Sun, 14 Feb 2021 21:08:07 +0000 (-0500) Subject: bgpd: Prevent store but never read of i X-Git-Tag: base_8.0~389^2~1 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=227b6af0d7b85c76cb0b5963a31b52fe6afd1622;p=matthieu%2Ffrr.git bgpd: Prevent store but never read of i The new bgp_mplsvpn_snmp.c code increments i and never uses that value. Comment the code out to make the clang SA analyzer happy. Shouldn't be a problem since this code will never probably be touched again(ha!). Signed-off-by: Donald Sharp --- diff --git a/bgpd/bgp_mplsvpn_snmp.c b/bgpd/bgp_mplsvpn_snmp.c index ef5556be17..055bae8432 100644 --- a/bgpd/bgp_mplsvpn_snmp.c +++ b/bgpd/bgp_mplsvpn_snmp.c @@ -1427,13 +1427,13 @@ static struct bgp_path_info *bgpL3vpnRte_lookup(struct variable *v, oid name[], nexthop.ipa_type = IPADDR_V4; oid2in_addr(&name[i], sizeof(struct in_addr), &nexthop.ip._v4_addr); - i += sizeof(struct in_addr); + /* i += sizeof(struct in_addr); */ break; case INETADDRESSTYPEIPV6: nexthop.ipa_type = IPADDR_V6; oid2in_addr(&name[i], sizeof(struct in6_addr), &nexthop.ip._v4_addr); /* sic */ - i += sizeof(struct in6_addr); + /* i += sizeof(struct in6_addr); */ break; } }