Re: [PATCH] iio: cdc: ad7746: Suppress false uninitialized value warning.

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

 



On Tue, 30 Aug 2022 23:04:47 +0300
Andy Shevchenko <andy.shevchenko@xxxxxxxxx> wrote:

> On Tue, Aug 30, 2022 at 10:10 PM Jonathan Cameron <jic23@xxxxxxxxxx> wrote:
> >
> > From: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx>
> >
> > Fix warning:
> > drivers/iio/cdc/ad7746.c:336:14: warning: use of uninitialized value '<unknown>' [CWE-457] [-Wanalyzer-use-of-uninitialized-value]
> > reported on linux-next.  The compiler can't see into the implementation
> > of kstrtobool() to identify that the if (ret < 0) condition is
> > sufficient to detect cases where this parameter is not initialized.  
> 
> Sorry, but to me this sounds like a false positive that provokes
> developer to add not only unneeded, but in some cases harmful code
> (yes, there were cases in the history when preinitializing variable
> with some value made a regression).
> NAK from me (but you always may overrule as a maintainer :-).
> 

I'm fine leaving it as is and exercising the delete key for any reports :)

Jonathan





[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux