diff --git a/bgpd/bgp_packet.c b/bgpd/bgp_packet.c index ca8dade8e8b8..f94b64d0bda4 100644 --- a/bgpd/bgp_packet.c +++ b/bgpd/bgp_packet.c @@ -3349,7 +3349,7 @@ static void bgp_dynamic_capability_fqdn(uint8_t *pnt, int action, memcpy(&str, data, len); str[len] = '\0'; } - data += len; + /* data += len; In case new code is ever added */ if (len) { XFREE(MTYPE_BGP_PEER_HOST, peer->domainname); diff --git a/bgpd/bgp_snmp_bgp4v2.c b/bgpd/bgp_snmp_bgp4v2.c index 48db73a343ca..0c8ed33d43ae 100644 --- a/bgpd/bgp_snmp_bgp4v2.c +++ b/bgpd/bgp_snmp_bgp4v2.c @@ -436,7 +436,6 @@ bgp4v2PathAttrLookup(struct variable *v, oid name[], size_t *length, struct bgp_path_info *path, *min; struct bgp_dest *dest; union sockunion su; - unsigned int len; struct ipaddr paddr = {}; size_t namelen = v ? v->namelen : BGP4V2_NLRI_ENTRY_OFFSET; sa_family_t family; @@ -544,11 +543,9 @@ bgp4v2PathAttrLookup(struct variable *v, oid name[], size_t *length, /* Set OID offset for prefix type */ offset = name + namelen; offsetlen = *length - namelen; - len = offsetlen; if (offsetlen == 0) { dest = bgp_table_top(bgp->rib[afi][SAFI_UNICAST]); - safi = SAFI_UNICAST; } else { /* bgp4V2NlriAfi is already get */ @@ -595,11 +592,6 @@ bgp4v2PathAttrLookup(struct variable *v, oid name[], size_t *length, return NULL; if (offsetlen > 0) { - len = offsetlen; - if (len > afi_len) - len = afi_len; - - /* get bgp4V2PeerRemoteAddrType */ peer_addr_type = *offset; if (peer_addr_type == IANA_AFI_IPV4) diff --git a/ospf6d/ospf6_neighbor.c b/ospf6d/ospf6_neighbor.c index 0cf3aade10a5..a6089b264195 100644 --- a/ospf6d/ospf6_neighbor.c +++ b/ospf6d/ospf6_neighbor.c @@ -741,7 +741,7 @@ DEFPY(ipv6_ospf6_p2xp_neigh, ipv6_ospf6_p2xp_neigh_cmd, return CMD_SUCCESS; } - p2xp_cfg = ospf6_if_p2xp_get(oi, &neighbor); + (void)ospf6_if_p2xp_get(oi, &neighbor); return CMD_SUCCESS; } diff --git a/pimd/pim_upstream.c b/pimd/pim_upstream.c index 335c8a454bd5..45c4df0e7e1d 100644 --- a/pimd/pim_upstream.c +++ b/pimd/pim_upstream.c @@ -909,7 +909,7 @@ static struct pim_upstream *pim_upstream_new(struct pim_instance *pim, * Set the right RPF so that future changes will * be right */ - rpf_result = pim_rpf_update(pim, up, NULL, __func__); + (void)pim_rpf_update(pim, up, NULL, __func__); pim_upstream_keep_alive_timer_start( up, pim->keep_alive_time); } diff --git a/zebra/redistribute.c b/zebra/redistribute.c index 18eac0044a12..70ace35a86f0 100644 --- a/zebra/redistribute.c +++ b/zebra/redistribute.c @@ -332,6 +332,14 @@ void redistribute_delete(const struct route_node *rn, /* Send a delete for the 'old' re to any subscribed client. */ if (zebra_redistribute_check(rn, old_re, client)) { + /* + * SA is complaining that old_re could be false + * SA is wrong because old_re is checked for NULL + * in zebra_redistribute_check and false is + * returned in that case. Let's just make SA + * happy. + */ + assert(old_re); is_table_direct = zebra_redistribute_is_table_direct(old_re); zsend_redistribute_route(ZEBRA_REDISTRIBUTE_ROUTE_DEL, client, rn, old_re,