FreeBSD and NetBSD spew a few more warnings about variable initialisers. Found with OSR's/NetDEF's fancy new CI system.
Signed-off-by: David Lamparter <[email protected]> --- bgpd/bgp_routemap.c | 4 ++-- ripngd/ripngd.c | 2 +- zebra/ioctl.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/bgpd/bgp_routemap.c b/bgpd/bgp_routemap.c index 33f802c..416a3e5 100644 --- a/bgpd/bgp_routemap.c +++ b/bgpd/bgp_routemap.c @@ -131,8 +131,8 @@ route_match_peer (void *rule, struct prefix *prefix, route_map_object_t type, void *object) { union sockunion *su; - union sockunion su_def = { .sin.sin_family = AF_INET, - .sin.sin_addr.s_addr = INADDR_ANY }; + union sockunion su_def = { .sin = { .sin_family = AF_INET, + .sin_addr.s_addr = INADDR_ANY } }; struct peer_group *group; struct peer *peer; struct listnode *node, *nnode; diff --git a/ripngd/ripngd.c b/ripngd/ripngd.c index 82e3818..4c0b67d 100644 --- a/ripngd/ripngd.c +++ b/ripngd/ripngd.c @@ -1317,7 +1317,7 @@ ripng_read (struct thread *thread) int sock; struct sockaddr_in6 from; struct ripng_packet *packet; - unsigned int ifindex; + unsigned int ifindex = 0; struct interface *ifp; int hoplimit = -1; diff --git a/zebra/ioctl.c b/zebra/ioctl.c index d783b0a..f7a7ff4 100644 --- a/zebra/ioctl.c +++ b/zebra/ioctl.c @@ -52,7 +52,7 @@ if_ioctl (u_long request, caddr_t buffer) { int sock; int ret; - int err; + int err = 0; if (zserv_privs.change(ZPRIVS_RAISE)) zlog (NULL, LOG_ERR, "Can't raise privileges"); @@ -85,7 +85,7 @@ if_ioctl_ipv6 (u_long request, caddr_t buffer) { int sock; int ret; - int err; + int err = 0; if (zserv_privs.change(ZPRIVS_RAISE)) zlog (NULL, LOG_ERR, "Can't raise privileges"); -- 2.0.4 _______________________________________________ Quagga-dev mailing list [email protected] https://lists.quagga.net/mailman/listinfo/quagga-dev
