]> git.puffer.fish Git - matthieu/frr.git/commitdiff
*: fix GCC 7 warnings/issues
authorDavid Lamparter <equinox@opensourcerouting.org>
Fri, 14 Jul 2017 14:48:41 +0000 (16:48 +0200)
committerDavid Lamparter <equinox@opensourcerouting.org>
Fri, 14 Jul 2017 14:59:44 +0000 (16:59 +0200)
The label initializer & nhrpd variable are just to shut up GCC 7,
the other two are actual bugs.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
bgpd/bgp_route.c
lib/command_graph.c
nhrpd/nhrp_vty.c
ospf6d/ospf6_route.c

index 88b63107e9b86825fe7a4fd74802839df6a55ac7..b535a4ea7af11c5d7defda698a4372a47889de8e 100644 (file)
@@ -8308,7 +8308,7 @@ route_vty_out_detail_header (struct vty *vty, struct bgp *bgp,
   int local_as = 0;
   int first = 1;
   int has_valid_label = 0;
-  mpls_label_t label;
+  mpls_label_t label = 0;
   json_object *json_adv_to = NULL;
 
   p = &rn->p;
index 8cfb3335753ee7760aac19acb4e0a0bd4fc7f4ad..4254b91d95f5f17bec8fe683c6471005e73e5e73 100644 (file)
@@ -349,7 +349,7 @@ cmd_merge_nodes (struct graph *oldgraph, struct graph *newgraph,
       if (i == vector_active (old->to) && direction > 0)
         {
           assert (vector_count (cnew->from) ==
-                          cmd_nodes_link (cnew, cnew) ? 2 : 1);
+                          (cmd_nodes_link (cnew, cnew) ? 2 : 1));
           graph_remove_edge (new, cnew);
 
           cmd_reparent_tree (newgraph, oldgraph, cnew);
index af7fb0a50d521eebb098c3db79a8eca06dbb7fc6..ae5bd6e23e4c9cea14a1ede65bc680e0a08f1c89 100644 (file)
@@ -671,7 +671,6 @@ static void show_ip_nhrp_shortcut(struct nhrp_shortcut *s, void *pctx)
 static void show_ip_opennhrp_cache(struct nhrp_cache *c, void *pctx)
 {
        struct info_ctx *ctx = pctx;
-       struct vty *vty = ctx->vty;
        char buf[SU_ADDRSTRLEN];
 
        if (ctx->afi != family2afi(sockunion_family(&c->remote_addr)))
index 7b01c69a86a8313be80e3587befa6aef5438bd63..d223651f486bfea0eb302eae19a1bf070bc4df9b 100644 (file)
@@ -43,7 +43,7 @@ unsigned char conf_debug_ospf6_route = 0;
 static char *
 ospf6_route_table_name (struct ospf6_route_table *table)
 {
-  static char name[32];
+  static char name[64];
   switch (table->scope_type)
     {
       case OSPF6_SCOPE_TYPE_GLOBAL: