From: Johannes Berg <johannes@sipsolutions.net>
To: Stephen Warren <swarren@wwwdotorg.org>
Cc: "John W. Linville" <linville@tuxdriver.com>,
"David S. Miller" <davem@davemloft.net>,
linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, Stephen Warren <swarren@nvidia.com>
Subject: Re: [PATCH] nl80211: avoid "wdev_id may be used uninitialized"
Date: Thu, 31 Jan 2013 21:51:37 +0100 [thread overview]
Message-ID: <1359665497.8415.102.camel@jlt4.sipsolutions.net> (raw)
In-Reply-To: <51094F10.60605@wwwdotorg.org>
On Wed, 2013-01-30 at 09:49 -0700, Stephen Warren wrote:
> On 01/30/2013 12:57 AM, Johannes Berg wrote:
> > On Tue, 2013-01-29 at 17:11 -0700, Stephen Warren wrote:
> >> From: Stephen Warren <swarren@nvidia.com>
> >>
> >> Silence the following:
> >> net/wireless/nl80211.c: In function '__cfg80211_wdev_from_attrs.clone.119':
> >> net/wireless/nl80211.c:57:6: warning: 'wdev_id' may be used uninitialized in this function
> >>
> >> ... by always initializing wdev_id to zero. I assume that wiphy_idx and
> >> ifidx are set to -1 for similar reasons, so this change simply propagates
> >> the same workaround.
> >>
> >> In practice, this warning is false, since wdev_id is both set and used
> >> under the condition if (have_wdev_id). However, at least my compiler
> >> can't be coerced into realizing this; almost any code between the if
> >> blocks that set and use the variable causes this warning.
> >
> > I don't see this warning? What compiler are you using?
>
> I'm using gcc-4.5.3 for ARM. I checked with gcc-4.6.3 and gcc-4.7.2 and
> indeed I don't see the warning there.
Interesting. So should I keep it or remove it? I guess in this
particular instance it doesn't matter all that much. In other cases I'd
be more against changing it I guess.
johannes
next prev parent reply other threads:[~2013-01-31 20:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-30 0:11 [PATCH] nl80211: avoid "wdev_id may be used uninitialized" Stephen Warren
2013-01-30 7:57 ` Johannes Berg
2013-01-30 16:49 ` Stephen Warren
2013-01-31 20:51 ` Johannes Berg [this message]
[not found] ` <1359665497.8415.102.camel-8Nb76shvtaUJvtFkdXX2HixXY32XiHfO@public.gmane.org>
2013-01-31 22:21 ` Stephen Warren
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=1359665497.8415.102.camel@jlt4.sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=netdev@vger.kernel.org \
--cc=swarren@nvidia.com \
--cc=swarren@wwwdotorg.org \
/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;
as well as URLs for NNTP newsgroup(s).