[cfe-dev] How to run the analyzer

Justin Bogner mail at justinbogner.com
Mon Mar 19 17:47:38 PDT 2012


Ignat Semenov <ragnarokk91 at gmail.com> writes:
> I've tried to do
>
>>scan-build make
>
> in the build directory of my code module.
>
> The build ran and scan-build gave me no errors or warnings. However, I
> can for sure see that in that code, there is at least one
> uninitialized pointer being written into.

You may need to set $CCC_CC and/or $CCC_CXX, especially if you're using
cross compilers or something like that. When you run scan-build it will
make sure that those compilers are put into $CC and $CXX respectively.

Similarly, if your makefile ignores $CC/$CXX, I don't think scan-build
will do what you want. It needs to replace the compiler you're using
with a wrapper.



More information about the cfe-dev mailing list