lkml.org 
[lkml]   [2013]   [Jan]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] nl80211: avoid "wdev_id may be used uninitialized"
From
Date
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?

johannes



\
 
 \ /
  Last update: 2013-01-30 09:41    [W:0.062 / U:0.876 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site