]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
hv_sock: Suppress bogus "may be used uninitialized" warnings
authorDexuan Cui <decui@microsoft.com>
Sat, 15 Jun 2019 05:00:57 +0000 (05:00 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sun, 16 Jun 2019 21:00:51 +0000 (14:00 -0700)
commitd424a2afd7da136a98e9485bfd6c5d5506bd77f8
tree02d840bc0bf092cdf518922c404b91e053d1dae7
parent718f4a2537089ea41903bf357071306163bc7c04
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>
net/vmw_vsock/hyperv_transport.c