From: Oleg Drokin <green@linuxhacker.ru>
To: Oleg Drokin <oleg.drokin@intel.com>
Cc: Greg KH <gregkh@linuxfoundation.org>,
Benedict Boerger <benedict.boerger@cs.tu-dortmund.de>,
<linux-kernel@vger.kernel.org>, <devel@driverdev.osuosl.org>,
<andreas.dilger@intel.com>
Subject: Re: [PATCH] drivers: staging: lustre: fix sparse warnings / delete unused function
Date: Mon, 11 Aug 2014 22:02:54 -0400 [thread overview]
Message-ID: <1A7F74DC-3922-4626-BDDF-E8E6C90C221C@linuxhacker.ru> (raw)
In-Reply-To: <4F91D9A1-B87D-498F-8089-7008F6BD4F30@intel.com>
On Aug 11, 2014, at 9:58 PM, Oleg Drokin wrote:
>
> On Aug 10, 2014, at 12:34 AM, Greg KH wrote:
>> Very odd, with this patch applied, I now get a build warning:
>>
>> drivers/staging/lustre/lnet/lnet/config.c: In function ‘lnet_parse_ip2nets’:
>> drivers/staging/lustre/lnet/lnet/config.c:1193:2: warning: ‘ipaddrs’ may be used uninitialized in this function [-Wmaybe-uninitialized]
>> lnet_ipaddr_free_enumeration(ipaddrs, nip);
>> ^
>
> What's even more odd is that the very previous line also uses ipaddrs, yet it does not trigger the warning.
> In any case I believe it's a false positive, since the only way it could remain unitialized is if
> libcfs_ipif_enumerate returned negative value (stored in nif in this function) and we check for it being more than zero
> before getting to that part of code.
>
> I'll submit a patch assigning ipaddrs to NULL as a workaround shortly.
Err, looking at the wrong function there, it's lnet_ipaddr_enumerate that returns negative if ipaddrs was not changed.
Anyway still false positive.
prev parent reply other threads:[~2014-08-12 2:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-08 16:26 Benedict Boerger
2014-08-10 4:34 ` Greg KH
2014-08-12 1:58 ` Drokin, Oleg
2014-08-12 2:02 ` Oleg Drokin [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=1A7F74DC-3922-4626-BDDF-E8E6C90C221C@linuxhacker.ru \
--to=green@linuxhacker.ru \
--cc=andreas.dilger@intel.com \
--cc=benedict.boerger@cs.tu-dortmund.de \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=oleg.drokin@intel.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
all inboxes | Powered by JetHome®