Search Linux Wireless

Re: [PATCH] mac80211: fix "warning: ‘target_metric’ may be used uninitialized"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2016-04-05 at 09:33 -0400, Jeff Mahoney wrote:
> On 4/5/16 5:43 AM, Johannes Berg wrote:
> > 
> > On Mon, 2016-04-04 at 14:15 -0400, Jeff Mahoney wrote:
> > > 
> > > This fixes:
> > > 
> > > net/mac80211/mesh_hwmp.c:603:26: warning: ‘target_metric’ may be
> > > used
> > > uninitialized in this function
> > > 
> > > target_metric is only consumed when reply = true so no bug exists
> > > here,
> > > but gcc doesn't notice that.  Initializing to 0 clears the
> > > warning.
> > > 
> > What gcc version are you using? Mine doesn't seem to have a problem
> > following the logic here.
> gcc version 4.8.5 (SUSE Linux)

Ok, mine's significantly newer:

gcc (Debian 5.3.1-10) 5.3.1 20160224

I do wonder though if we really should do this? It might hide errors
later on?

johannes
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux