Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/netinet6 Fix kernel builds (gcc 4.8)



details:   https://anonhg.NetBSD.org/src/rev/e29bc32e503c
branches:  trunk
changeset: 816899:e29bc32e503c
user:      ozaki-r <ozaki-r%NetBSD.org@localhost>
date:      Mon Aug 01 04:37:53 2016 +0000

description:
Fix kernel builds (gcc 4.8)

diffstat:

 sys/netinet6/in6.c          |  6 +++---
 sys/netinet6/in6_ifattach.c |  8 ++++----
 2 files changed, 7 insertions(+), 7 deletions(-)

diffs (56 lines):

diff -r 69fd558421c4 -r e29bc32e503c sys/netinet6/in6.c
--- a/sys/netinet6/in6.c        Mon Aug 01 03:43:25 2016 +0000
+++ b/sys/netinet6/in6.c        Mon Aug 01 04:37:53 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: in6.c,v 1.213 2016/08/01 03:15:31 ozaki-r Exp $        */
+/*     $NetBSD: in6.c,v 1.214 2016/08/01 04:37:53 ozaki-r Exp $        */
 /*     $KAME: in6.c,v 1.198 2001/07/18 09:12:38 itojun Exp $   */
 
 /*
@@ -62,7 +62,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: in6.c,v 1.213 2016/08/01 03:15:31 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: in6.c,v 1.214 2016/08/01 04:37:53 ozaki-r Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -1486,7 +1486,7 @@
 in6_lifaddr_ioctl(struct socket *so, u_long cmd, void *data, 
        struct ifnet *ifp)
 {
-       struct in6_ifaddr *ia;
+       struct in6_ifaddr *ia = NULL; /* XXX gcc 4.8 maybe-uninitialized */
        struct if_laddrreq *iflr = (struct if_laddrreq *)data;
        struct ifaddr *ifa;
        struct sockaddr *sa;
diff -r 69fd558421c4 -r e29bc32e503c sys/netinet6/in6_ifattach.c
--- a/sys/netinet6/in6_ifattach.c       Mon Aug 01 03:43:25 2016 +0000
+++ b/sys/netinet6/in6_ifattach.c       Mon Aug 01 04:37:53 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: in6_ifattach.c,v 1.103 2016/08/01 03:15:31 ozaki-r Exp $       */
+/*     $NetBSD: in6_ifattach.c,v 1.104 2016/08/01 04:37:53 ozaki-r Exp $       */
 /*     $KAME: in6_ifattach.c,v 1.124 2001/07/18 08:32:51 jinmei Exp $  */
 
 /*
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: in6_ifattach.c,v 1.103 2016/08/01 03:15:31 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: in6_ifattach.c,v 1.104 2016/08/01 04:37:53 ozaki-r Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -321,8 +321,8 @@
 {
        struct ifaddr *ifa;
        const struct sockaddr_dl *sdl = NULL;
-       const char *addr;
-       size_t addrlen;
+       const char *addr = NULL; /* XXX gcc 4.8 -Werror=maybe-uninitialized */
+       size_t addrlen = 0; /* XXX gcc 4.8 -Werror=maybe-uninitialized */
        static u_int8_t allzero[8] = { 0, 0, 0, 0, 0, 0, 0, 0 };
        static u_int8_t allone[8] =
                { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };



Home | Main Index | Thread Index | Old Index