[Swan-dev] unreachable code

Lennart Sorensen lsorense at csclub.uwaterloo.ca
Tue Mar 11 19:09:10 EET 2014


On Tue, Mar 11, 2014 at 01:07:14PM -0400, Lennart Sorensen wrote:
> On Tue, Mar 11, 2014 at 12:47:43PM -0400, Paul Wouters wrote:
> > On Mon, 10 Mar 2014, Lennart Sorensen wrote:
> > 
> > >>Coverity knows :)
> > >
> > >Maybe scanbuild (from clang) would do it.  It seems to be getting
> > >quite good.
> > 
> > I first compiled using CC=clang, which worked and gave a few errors I
> > fixed.
> > 
> > Then I used scan-build for a report, but I haven't looked at it yet in
> > detail. It's up at ftp://ftp.nohats.ca/libreswan-scanbuild/
> > 
> > to create it, I used:
> > 
> > sudo yum install clang-analyzer
> > scan-build make programs
> > 
> > Thanks for the tip,
> 
> It should have created an html report (probably in /tmp) which is much more useful to look at.
> 
> As the last line says:
> 
> /tmp/scan-build-2014-03-11-2
> 
> If you put that on the ftp server it would be nice to look at.
> 
> It claims to have found 145 "bugs".

The .err file has all the problems too, but the html report shows you code
context and what assumptions were made at each condition to get there.

Certainly some stuff that should be fixed in there.

-- 
Len Sorensen


More information about the Swan-dev mailing list