Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d424a2af authored by Dexuan Cui's avatar Dexuan Cui Committed by David S. Miller
Browse files

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: default avatarDexuan Cui <decui@microsoft.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 718f4a25
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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;