Linux IIO development
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: linux-iio <linux-iio@vger.kernel.org>,
	Jonathan Cameron <Jonathan.Cameron@huawei.com>
Subject: Re: [PATCH] iio: cdc: ad7746: Suppress false uninitialized value warning.
Date: Sun, 4 Sep 2022 16:53:56 +0100	[thread overview]
Message-ID: <20220904165356.0620c707@jic23-huawei> (raw)
In-Reply-To: <CAHp75VfjWOdgAW=YuszG5Dih_2D78YB20ShaNWVxMGjOKQhsWQ@mail.gmail.com>

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

> On Tue, Aug 30, 2022 at 10:10 PM Jonathan Cameron <jic23@kernel.org> wrote:
> >
> > From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> >
> > 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



      reply	other threads:[~2022-09-04 16:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-30 18:33 [PATCH] iio: cdc: ad7746: Suppress false uninitialized value warning Jonathan Cameron
2022-08-30 20:04 ` Andy Shevchenko
2022-09-04 15:53   ` Jonathan Cameron [this message]

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=20220904165356.0620c707@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=linux-iio@vger.kernel.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