*: fix GCC 7 warnings/issues

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>
This commit is contained in:
David Lamparter 2017-07-14 16:48:41 +02:00
parent acd738fc7f
commit 20a6c6f31f
4 changed files with 3 additions and 4 deletions

View 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;

View 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);

View 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)))

View 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: