Initialise in6 to avoid...
In file included from include/net/inetpeer.h:15:0, from include/net/route.h:28, from include/net/inet_hashtables.h:32, from include/net/tcp.h:37, from net/ipv4/tcp.c:275: net/ipv4/tcp.c: In function ‘tcp_nuke_addr’: include/net/ipv6.h:417:34: warning: ‘in6’ may be used uninitialized in this function [-Wmaybe-uninitialized] return ((ul1[0] ^ ul2[0]) | (ul1[1] ^ ul2[1])) == 0UL; ^ net/ipv4/tcp.c:3513:19: note: ‘in6’ was declared here struct in6_addr *in6;
Signed-off-by: Jon Medhurst tixy@linaro.org --- net/ipv4/tcp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index aabb528..8cc9b54 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c @@ -3510,7 +3510,7 @@ int tcp_nuke_addr(struct net *net, struct sockaddr *addr)
struct in_addr *in; #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) - struct in6_addr *in6; + struct in6_addr *in6 = NULL; #endif if (family == AF_INET) { in = &((struct sockaddr_in *)addr)->sin_addr;