[lkml]   [2019]   [Aug]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] Tools: hv: kvp: eliminate 'may be used uninitialized' warning
On Mon, Aug 19, 2019 at 04:44:09PM +0200, Vitaly Kuznetsov wrote:
>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 <>

Queued up for hyperv-fixes, thank you.


 \ /
  Last update: 2019-08-20 17:30    [W:0.040 / U:5.452 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site