]> git.proxmox.com Git - mirror_frr.git/commitdiff
Address the error "Dead assignment" of static analysif
authorHung-Weic Chiu <sppsorrg@gmail.com>
Wed, 10 May 2017 02:51:28 +0000 (02:51 +0000)
committerQuentin Young <qlyoung@users.noreply.github.com>
Wed, 10 May 2017 19:46:24 +0000 (15:46 -0400)
- 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>
bgpd/bgp_btoa.c
bgpd/bgpd.c
bgpd/rfapi/rfapi_rib.c
isisd/isis_pdu.c
ospfd/ospf_flood.c
ospfd/ospf_te.c
ripd/ripd.c
ripngd/ripngd.c
zebra/label_manager.c

index 37bef9b85d7267cae764e45bcdc6a0a98f74246b..d3162a4ea52e52850a5b0540a57c03a77e8b5115 100644 (file)
@@ -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");
index 9af26f5510065ddebee0d7064dbc7a5d178eece2..24ef4465fe1f07fa4279e8ca8adcd7c34d648351 100644 (file)
@@ -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);
            }
        }
     }
index d633023dcf86e26cc60270569ef68a8a16b3d745..8fb2fe44edd5ac2803f135ff2917a9411b1bb29e 100644 (file)
@@ -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);
index 5fbf6c194ea72281d1e7729aa93503d73542e471..a41581ff02acfbf66f29176cdc7878c480d3ff53 100644 (file)
@@ -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;
        }
     }
 
index 417a7aa8d2750a9c2e31943c6e4f1e3109d536c5..4cc28f74861ee5d464caf2e498f72707e483289d 100644 (file)
@@ -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
index 449f9e7b97f7f7767bc529c6052f5bba9c1a4b0f..a89d67c6bbe03841b8bb0d6bb414177a26a5d251 100644 (file)
@@ -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);
         }
     }
 
index b668b0a0b41b942e91c6edaf76fd01c63a98d26f..9e8c21da31ca57f92704c373d66d0fb574bc6d61 100644 (file)
@@ -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);
     }
 
index a883bec3c43f491f9fa468b87c7e8e1405678e31..8ea66517c3e9e5d69ff6aa026212664ff020f837 100644 (file)
@@ -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);
index bf67141cd49ff9763561eaa1d9ee749f2e35e584..7dbb36edb8f9667ad15e9ac619392eb410a2ca45 100644 (file)
@@ -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) {