From 146f542aac2cc725aa32f51b354eba5ece7ae08b Mon Sep 17 00:00:00 2001 From: Jon Medhurst Date: Thu, 16 Apr 2015 18:16:53 +0530 Subject: [PATCH] =?utf8?q?tcp:=20Silence=20warning:=20=E2=80=98in6?= =?utf8?q?=E2=80=99=20may=20be=20used=20uninitialized?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Amit Pundir --- 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 089a948fe834..a2639cb7c9d8 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c @@ -3490,7 +3490,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; -- 2.34.1