netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net, vxlan Fix compile warning
@ 2013-09-13 12:29 Prarit Bhargava
  2013-09-13 12:58 ` Jiri Pirko
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Prarit Bhargava @ 2013-09-13 12:29 UTC (permalink / raw)
  To: netdev; +Cc: Prarit Bhargava, jpirko, tgraf, David S. Miller

Fix a unintialized variable warning.

drivers/net/vxlan.c: In function ‘vxlan_sock_add’:
drivers/net/vxlan.c:2240:11: error: ‘sock’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
  vs->sock = sock;
           ^
drivers/net/vxlan.c:2217:17: note: ‘sock’ was declared here
  struct socket *sock;
                 ^

Signed-off-by: Prarit Bhargava <prarit@redhat.com>
Cc: jpirko@redhat.com
Cc: tgraf@redhat.com
Cc: "David S. Miller" <davem@davemloft.net>
---
 drivers/net/vxlan.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
index bf64b41..ed3d7f4 100644
--- a/drivers/net/vxlan.c
+++ b/drivers/net/vxlan.c
@@ -2276,7 +2276,7 @@ static struct vxlan_sock *vxlan_socket_create(struct net *net, __be16 port,
 {
 	struct vxlan_net *vn = net_generic(net, vxlan_net_id);
 	struct vxlan_sock *vs;
-	struct socket *sock;
+	struct socket *uninitialized_var(sock);
 	struct sock *sk;
 	int rc = 0;
 	unsigned int h;
-- 
1.7.9.3

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2013-09-19 13:13 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-13 12:29 [PATCH] net, vxlan Fix compile warning Prarit Bhargava
2013-09-13 12:58 ` Jiri Pirko
2013-09-13 14:20 ` Stephen Hemminger
2013-09-13 14:23   ` Prarit Bhargava
2013-09-13 14:40     ` Stephen Hemminger
2013-09-17  1:23 ` David Miller
2013-09-17 19:12   ` [PATCH 1/2] " Prarit Bhargava
2013-09-17 20:26     ` Ben Hutchings
2013-09-19 13:04       ` [PATCH 1/2] net, vxlan Fix compile warning [v3] Prarit Bhargava
2013-09-19 13:09         ` David Miller
2013-09-19 13:13           ` Prarit Bhargava

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).