[systemd-devel] [PATCH 2/2] autogen: add shortcut for running scan-build
Lennart Poettering
lennart at poettering.net
Sat Dec 28 13:12:10 PST 2013
On Sat, 28.12.13 21:22, Thomas H.P. Andersen (phomes at gmail.com) wrote:
>
> On Sat, Dec 28, 2013 at 1:14 PM, Lennart Poettering
> <lennart at poettering.net> wrote:
> > On Fri, 27.12.13 22:25, Thomas H.P. Andersen (phomes at gmail.com) wrote:
> >
> >> From: Thomas Hindoe Paaboel Andersen <phomes at gmail.com>
> >>
> >> scan-build is a static analyzer in llvm. As ususal static analyzers
> >> tend to mostly find theoretical bugs in software that has been in
> >> production for a while. For in-development code it can be useful to
> >> check if new issues is added as there is a chance to spot real problems
> >> before release. For systemd we are now down to 297 issues - the vast
> >> majority are false positives because the tool does not understand the
> >> cleanup attribute.
> >>
> >> Running clang's static analyzer scan-build is a bit messy. You have to
> >> run both configure and make "inside" the build-scan tool. To have an
> >> easy shortcut from autogen.sh I thus call both directly from it. This
> >> makes it different from the other options in autogen.sh. I chose 's'
> >> for static analysis.
> >>
> >> scan-build is in the package clang-analyzer on fedora. On fedora we
> >> also need to set --use-analyzer=/usr/bin/clang
> >
> > On my system I do not need to set --use-analyzer here? It works fine
> > without?
>
> Ah, it was fixed a month ago in v3.3-3:
> https://bugzilla.redhat.com/show_bug.cgi?id=982645
>
> Ok to commit with that removed?
Sure! Go ahead!
Lennart
--
Lennart Poettering, Red Hat
More information about the systemd-devel
mailing list