Files
linux/tools
Vitaly Kuznetsov 0c526ac40d Tools: hv: kvp: eliminate 'may be used uninitialized' warning
[ Upstream commit 89eb4d8d25 ]

When building hv_kvp_daemon GCC-8.3 complains:

hv_kvp_daemon.c: In function ‘kvp_get_ip_info.constprop’:
hv_kvp_daemon.c:812:30: warning: ‘ip_buffer’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  struct hv_kvp_ipaddr_value *ip_buffer;

this seems to be a false positive: we only use ip_buffer when
op == KVP_OP_GET_IP_INFO and it is only unset when op == KVP_OP_ENUMERATE.

Silence the warning by initializing ip_buffer to NULL.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-05-15 14:28:29 +09:00
..
2023-05-15 08:58:19 +09:00
2023-05-15 12:59:36 +09:00
2011-11-07 21:10:47 -05:00
2014-07-23 10:16:38 -07:00
2016-06-23 11:07:13 +02:00