From b0689168486e8446e681d984e2230da23b942fca Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Sun, 15 May 2016 13:31:30 -0400 Subject: [PATCH] bgpd: Fix more clang compiler warnings Remove some dead code and fix initialization of the sockunion. Signed-off-by: Donald Sharp Reviewed-by: Daniel Walton --- bgpd/bgp_attr.c | 1 - bgpd/bgp_routemap.c | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/bgpd/bgp_attr.c b/bgpd/bgp_attr.c index d37fa1e79a..366b105f22 100644 --- a/bgpd/bgp_attr.c +++ b/bgpd/bgp_attr.c @@ -74,7 +74,6 @@ static const struct message attr_flag_str[] = /* bgp_attr_flags_diagnose() relies on this bit being last in this list */ { BGP_ATTR_FLAG_EXTLEN, "Extended Length" }, }; -static const size_t attr_flag_str_max = array_size(attr_flag_str); static struct hash *cluster_hash; diff --git a/bgpd/bgp_routemap.c b/bgpd/bgp_routemap.c index 48cdd518dd..90f4cfe8b1 100644 --- a/bgpd/bgp_routemap.c +++ b/bgpd/bgp_routemap.c @@ -118,8 +118,8 @@ route_match_peer (void *rule, struct prefix *prefix, route_map_object_t type, void *object) { union sockunion *su; - union sockunion su_def = { .sa.sa_family = AF_INET, - .sin.sin_addr.s_addr = INADDR_ANY }; + union sockunion su_def = { .sin.sin_family = AF_INET, + .sin.sin_addr.s_addr = INADDR_ANY }; struct peer_group *group; struct peer *peer; struct listnode *node, *nnode; -- 2.39.5