Skip to content

Commit d424a2a

Browse files
dcuidavem330
authored andcommitted
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>
1 parent 718f4a2 commit d424a2a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎net/vmw_vsock/hyperv_transport.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -344,8 +344,8 @@ static void hvs_open_connection(struct vmbus_channel *chan)
344344

345345
struct sockaddr_vm addr;
346346
struct sock *sk, *new = NULL;
347-
struct vsock_sock *vnew;
348-
struct hvsock *hvs, *hvs_new;
347+
struct vsock_sock *vnew = NULL;
348+
struct hvsock *hvs, *hvs_new = NULL;
349349
int ret;
350350

351351
if_type = &chan->offermsg.offer.if_type;

0 commit comments

Comments
 (0)