From 227b6af0d7b85c76cb0b5963a31b52fe6afd1622 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Sun, 14 Feb 2021 16:08:07 -0500 Subject: [PATCH] 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 --- bgpd/bgp_mplsvpn_snmp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; } } -- 2.39.5