summaryrefslogtreecommitdiffstats
path: root/net/vmw_vsock
diff options
context:
space:
mode:
authorDexuan Cui2019-06-15 07:00:57 +0200
committerDavid S. Miller2019-06-16 23:00:51 +0200
commitd424a2afd7da136a98e9485bfd6c5d5506bd77f8 (patch)
tree02d840bc0bf092cdf518922c404b91e053d1dae7 /net/vmw_vsock
parentbe2net: Fix number of Rx queues used for flow hashing (diff)
downloadkernel-qcow2-linux-d424a2afd7da136a98e9485bfd6c5d5506bd77f8.tar.gz
kernel-qcow2-linux-d424a2afd7da136a98e9485bfd6c5d5506bd77f8.tar.xz
kernel-qcow2-linux-d424a2afd7da136a98e9485bfd6c5d5506bd77f8.zip
hv_sock: Suppress bogus "may be used uninitialized" warnings
gcc 8.2.0 may report these bogus warnings under some condition: warning: ‘vnew’ may be used uninitialized in this function warning: ‘hvs_new’ may be used uninitialized in this function Actually, the 2 pointers are only initialized and used if the variable "conn_from_host" is true. The code is not buggy here. Signed-off-by: Dexuan Cui <decui@microsoft.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/vmw_vsock')
-rw-r--r--net/vmw_vsock/hyperv_transport.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/vmw_vsock/hyperv_transport.c b/net/vmw_vsock/hyperv_transport.c
index 982a8dc49e03..e4801c7261b4 100644
--- a/net/vmw_vsock/hyperv_transport.c
+++ b/net/vmw_vsock/hyperv_transport.c
@@ -344,8 +344,8 @@ static void hvs_open_connection(struct vmbus_channel *chan)
struct sockaddr_vm addr;
struct sock *sk, *new = NULL;
- struct vsock_sock *vnew;
- struct hvsock *hvs, *hvs_new;
+ struct vsock_sock *vnew = NULL;
+ struct hvsock *hvs, *hvs_new = NULL;
int ret;
if_type = &chan->offermsg.offer.if_type;