Re: [RFC/PATCH] Makefile: add cppcheck target

2016-12-14 Thread Jeff King
On Wed, Dec 14, 2016 at 09:33:59PM +1300, Chris Packham wrote: > > 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-

Re: [RFC/PATCH] Makefile: add cppcheck target

2016-12-14 Thread Chris Packham
On Wed, Dec 14, 2016 at 1:15 AM, Jeff King wrote: > On Tue, Dec 13, 2016 at 10:22:25PM +1300, Chris Packham wrote: > >> $ make cppcheck >> cppcheck --force --quiet --inline-suppr . >> [compat/nedmalloc/malloc.c.h:4093]: (error) Possible null pointer >> dereference: sp >> [compat/nedmalloc/malloc

Re: [RFC/PATCH] Makefile: add cppcheck target

2016-12-14 Thread Chris Packham
On Wed, Dec 14, 2016 at 1:28 AM, Jeff King wrote: > On Tue, Dec 13, 2016 at 07:15:10AM -0500, Jeff King wrote: > >> I think these last two are a good sign that we need to be feeding the >> list of source files to cppcheck. I tried your patch and it also started >> looking in t/perf/build, which ar

Re: [RFC/PATCH] Makefile: add cppcheck target

2016-12-13 Thread Jeff King
On Tue, Dec 13, 2016 at 07:15:10AM -0500, Jeff King wrote: > I think these last two are a good sign that we need to be feeding the > list of source files to cppcheck. I tried your patch and it also started > looking in t/perf/build, which are old versions of git built to serve > the performance-te

Re: [RFC/PATCH] Makefile: add cppcheck target

2016-12-13 Thread Jeff King
On Tue, Dec 13, 2016 at 10:22:25PM +1300, Chris Packham wrote: > $ make cppcheck > cppcheck --force --quiet --inline-suppr . > [compat/nedmalloc/malloc.c.h:4093]: (error) Possible null pointer > dereference: sp > [compat/nedmalloc/malloc.c.h:4106]: (error) Possible null pointer > dereference: s

Re: [RFC/PATCH] Makefile: add cppcheck target

2016-12-13 Thread stefan.naewe
Am 13.12.2016 um 10:32 schrieb Chris Packham: > On Tue, Dec 13, 2016 at 10:22 PM, Chris Packham > wrote: >> Add cppcheck target to Makefile. Cppcheck is a static >> analysis tool for C/C++ code. Cppcheck primarily detects >> the types of bugs that the compilers normally do not detect. >> It is an

Re: [RFC/PATCH] Makefile: add cppcheck target

2016-12-13 Thread Chris Packham
On Tue, Dec 13, 2016 at 10:22 PM, Chris Packham wrote: > Add cppcheck target to Makefile. Cppcheck is a static > analysis tool for C/C++ code. Cppcheck primarily detects > the types of bugs that the compilers normally do not detect. > It is an useful target for doing QA analysis. > > Based-on-patc

[RFC/PATCH] Makefile: add cppcheck target

2016-12-13 Thread Chris Packham
Add cppcheck target to Makefile. Cppcheck is a static analysis tool for C/C++ code. Cppcheck primarily detects the types of bugs that the compilers normally do not detect. It is an useful target for doing QA analysis. Based-on-patch-by: Elia Pinto Signed-off-by: Chris Packham --- I had been play