From: Sasha Levin <sashal@kernel.org>
To: Vitaly Kuznetsov <vkuznets@redhat.com>
Cc: linux-hyperv@vger.kernel.org,
"K. Y. Srinivasan" <kys@microsoft.com>,
Haiyang Zhang <haiyangz@microsoft.com>,
Stephen Hemminger <sthemmin@microsoft.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Tools: hv: kvp: eliminate 'may be used uninitialized' warning
Date: Tue, 20 Aug 2019 11:30:15 -0400 [thread overview]
Message-ID: <20190820153015.GN30205@sasha-vm> (raw)
In-Reply-To: <20190819144409.13349-1-vkuznets@redhat.com>
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 <vkuznets@redhat.com>
Queued up for hyperv-fixes, thank you.
--
Thanks,
Sasha
prev parent reply other threads:[~2019-08-20 15:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-19 14:44 [PATCH] Tools: hv: kvp: eliminate 'may be used uninitialized' warning Vitaly Kuznetsov
2019-08-20 15:30 ` Sasha Levin [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190820153015.GN30205@sasha-vm \
--to=sashal@kernel.org \
--cc=haiyangz@microsoft.com \
--cc=kys@microsoft.com \
--cc=linux-hyperv@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sthemmin@microsoft.com \
--cc=vkuznets@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox