diff options
author | Hung-Weic Chiu <sppsorrg@gmail.com> | 2017-05-10 04:51:28 +0200 |
---|---|---|
committer | Quentin Young <qlyoung@users.noreply.github.com> | 2017-05-10 21:46:24 +0200 |
commit | 4afc1b4d4b88484379a78d794e9eee7374cb8b08 (patch) | |
tree | 95f8b362fd568833a2773c5685542bd6d6e25e6d | |
parent | - Solve the Coverity Scan PW.ASSIGN_WHERE_COMPARE_MEANT (diff) | |
download | frr-4afc1b4d4b88484379a78d794e9eee7374cb8b08.tar.xz frr-4afc1b4d4b88484379a78d794e9eee7374cb8b08.zip |
Address the error "Dead assignment" of static analysif
- Refer to https://ci1.netdef.org/browse/FRR-FRR4-44/artifact/shared/static_analysis/index.html
- Remove unused variable
Signed-off-by: Hung-Weic Chiu <sppsorrg@gmail.com>
-rw-r--r-- | bgpd/bgp_btoa.c | 2 | ||||
-rw-r--r-- | bgpd/bgpd.c | 2 | ||||
-rw-r--r-- | bgpd/rfapi/rfapi_rib.c | 1 | ||||
-rw-r--r-- | isisd/isis_pdu.c | 1 | ||||
-rw-r--r-- | ospfd/ospf_flood.c | 1 | ||||
-rw-r--r-- | ospfd/ospf_te.c | 4 | ||||
-rw-r--r-- | ripd/ripd.c | 1 | ||||
-rw-r--r-- | ripngd/ripngd.c | 12 | ||||
-rw-r--r-- | zebra/label_manager.c | 1 |
9 files changed, 10 insertions, 15 deletions
diff --git a/bgpd/bgp_btoa.c b/bgpd/bgp_btoa.c index 37bef9b85..d3162a4ea 100644 --- a/bgpd/bgp_btoa.c +++ b/bgpd/bgp_btoa.c @@ -238,7 +238,7 @@ main (int argc, char **argv) printf ("len: %zd\n", len); - ret = fread (s->data + 12, len, 1, fp); + fread (s->data + 12, len, 1, fp); if (feof (fp)) { printf ("ENDOF FILE 2\n"); diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c index 9af26f551..24ef4465f 100644 --- a/bgpd/bgpd.c +++ b/bgpd/bgpd.c @@ -6116,7 +6116,7 @@ peer_ttl_security_hops_set (struct peer *peer, int gtsm_hops) * min & max ttls on the socket. The return value is * irrelevant. */ - ret = peer_ebgp_multihop_set (peer, MAXTTL); + peer_ebgp_multihop_set (peer, MAXTTL); } } } diff --git a/bgpd/rfapi/rfapi_rib.c b/bgpd/rfapi/rfapi_rib.c index d633023dc..8fb2fe44e 100644 --- a/bgpd/rfapi/rfapi_rib.c +++ b/bgpd/rfapi/rfapi_rib.c @@ -1306,7 +1306,6 @@ callback: if (!printedprefix) { vnc_zlog_debug_verbose ("%s: For prefix %s (d)", __func__, buf_prefix); - printedprefix = 1; } vnc_zlog_debug_verbose ("%s: delete_list has %d elements", __func__, delete_list->count); diff --git a/isisd/isis_pdu.c b/isisd/isis_pdu.c index 5fbf6c194..a41581ff0 100644 --- a/isisd/isis_pdu.c +++ b/isisd/isis_pdu.c @@ -1458,7 +1458,6 @@ process_lsp (int level, struct isis_circuit *circuit, const u_char *ssnpa) ((level == IS_LEVEL_2) && (circuit->u.p2p.neighbor->adj_usage == ISIS_ADJ_LEVEL1))) return ISIS_WARNING; /* Silently discard */ - adj = circuit->u.p2p.neighbor; } } diff --git a/ospfd/ospf_flood.c b/ospfd/ospf_flood.c index 417a7aa8d..4cc28f748 100644 --- a/ospfd/ospf_flood.c +++ b/ospfd/ospf_flood.c @@ -260,7 +260,6 @@ ospf_flood (struct ospf *ospf, struct ospf_neighbor *nbr, (void *)current, dump_lsa_key (new)); - lsa_ack_flag = 0; oi = nbr->oi; /* If there is already a database copy, and if the diff --git a/ospfd/ospf_te.c b/ospfd/ospf_te.c index 449f9e7b9..a89d67c6b 100644 --- a/ospfd/ospf_te.c +++ b/ospfd/ospf_te.c @@ -1480,12 +1480,12 @@ ospf_mpls_te_lsa_originate_as (void *arg) if (IS_FLOOD_AS (lp->type)) { top = (struct ospf *) arg; - rc = ospf_mpls_te_lsa_originate2 (top, lp); + ospf_mpls_te_lsa_originate2 (top, lp); } else { area = (struct ospf_area *) arg; - rc = ospf_mpls_te_lsa_originate1 (area, lp); + ospf_mpls_te_lsa_originate1 (area, lp); } } diff --git a/ripd/ripd.c b/ripd/ripd.c index b668b0a0b..9e8c21da3 100644 --- a/ripd/ripd.c +++ b/ripd/ripd.c @@ -2398,7 +2398,6 @@ rip_output_process (struct connected *ifc, struct sockaddr_in *to, if (ret >= 0 && IS_RIP_DEBUG_SEND) rip_packet_dump ((struct rip_packet *)STREAM_DATA (s), stream_get_endp (s), "SEND"); - num = 0; stream_reset (s); } diff --git a/ripngd/ripngd.c b/ripngd/ripngd.c index a883bec3c..8ea66517c 100644 --- a/ripngd/ripngd.c +++ b/ripngd/ripngd.c @@ -970,11 +970,11 @@ ripng_redistribute_add (int type, int sub_type, struct prefix_ipv6 *p, } } - rinfo = ripng_ecmp_replace (&newinfo); + ripng_ecmp_replace (&newinfo); route_unlock_node (rp); } else - rinfo = ripng_ecmp_add (&newinfo); + ripng_ecmp_add (&newinfo); if (IS_RIPNG_DEBUG_EVENT) { if (!nexthop) @@ -2021,11 +2021,11 @@ DEFUN (show_ipv6_ripng, p = (struct prefix_ipv6 *) &rp->p; #ifdef DEBUG - len = vty_out (vty, "R(a) %d/%d %s/%d ", + vty_out (vty, "R(a) %d/%d %s/%d ", aggregate->count, aggregate->suppress, inet6_ntoa (p->prefix), p->prefixlen); #else - len = vty_out (vty, "R(a) %s/%d ", + vty_out (vty, "R(a) %s/%d ", inet6_ntoa (p->prefix), p->prefixlen); #endif /* DEBUG */ vty_out (vty, "%s", VTY_NEWLINE); @@ -2043,13 +2043,13 @@ DEFUN (show_ipv6_ripng, p = (struct prefix_ipv6 *) &rp->p; #ifdef DEBUG - len = vty_out (vty, "%c(%s) 0/%d %s/%d ", + vty_out (vty, "%c(%s) 0/%d %s/%d ", zebra_route_char(rinfo->type), ripng_route_subtype_print(rinfo), rinfo->suppress, inet6_ntoa (p->prefix), p->prefixlen); #else - len = vty_out (vty, "%c(%s) %s/%d ", + vty_out (vty, "%c(%s) %s/%d ", zebra_route_char(rinfo->type), ripng_route_subtype_print(rinfo), inet6_ntoa (p->prefix), p->prefixlen); diff --git a/zebra/label_manager.c b/zebra/label_manager.c index bf67141cd..7dbb36edb 100644 --- a/zebra/label_manager.c +++ b/zebra/label_manager.c @@ -205,7 +205,6 @@ struct label_manager_chunk *assign_label_chunk(u_char proto, u_short instance, struct label_manager_chunk *lmc; struct listnode *node; - node = lbl_mgr.lc_list->head; /* first check if there's one available */ for (ALL_LIST_ELEMENTS_RO(lbl_mgr.lc_list, node, lmc)) { if (lmc->proto == NO_PROTO && lmc->end - lmc->start + 1 == size) { |