Re: [RFC/PATCH] Makefile: add cppcheck target
- From
Jeff King <peff@peff.net>
- Date
- Dec 14, 2016, 11:18 UTC
- Message-ID
- <20161214111856.nhtq4l3ntrhy2fhv@sigill.intra.peff.net>
- In-Reply-To
- <CAFOYHZBRq=5FGswQZSYbn0JdrEv+xqLm6gdpD_nE+1L_CfPHEw@mail.gmail.com>
On Wed, Dec 14, 2016 at 09:33:59PM +1300, Chris Packham wrote:
Show 9 quoted lines
> > I do see a few real problems, but many false positives, too. > > Unfortunately, one of the false positives is: > > > > int foo = foo; > > On I side note I have often wondered how this actually works to avoid > the uninitialised-ness of foo. I can see how some compilers may be > fooled into thinking that foo has been set but that doesn't actually > end up with foo having a deterministic value.
Right, this is only used to shut up the compiler when it incorrectly thinks the variable is uninitialized.
-Peff