Re: [PATCH 2/2] nl80211.c: Fixed the wdev_id being used uninitialized.

From: Johannes Berg
Date: Mon Sep 01 2014 - 08:42:32 EST


On Mon, 2014-09-01 at 08:33 -0400, Shakil A Khan wrote:
> On Monday 01 September 2014 08:07:38 Johannes Berg wrote:
> > > + u64 wdev_id = 0;
> >
> > it's not used uninitialized, NACK.
> >
> > johannes
> >
>
> wdev_id can be used uninitialized if have_wdev_id turns to be false,
> which may happen if the entry for NL80211_ATTR_WDEV is removed in
> future. Who knows.

In which case the compiler will warn about it. If you were to use a
newer compiler now, you wouldn't see the warning.

johannes


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/