On 2011-07-02 10:05, Campbell Barton wrote:
Hi, just ran scan build with inkscape c/c++ source, using LLVM/CLang
from latest SVN

Heres the results, some false positives but looks like some real bugs too.

http://clang.blenderheads.org/inkscape/2011-07-02/

run from r10398
VERY cool! Having looked at some of the reports I see that there might indeed be some actual bugs, but also quite a few possible false positives. Is there any way to communicate certain "preconditions" to the static analyzer? For example, in filters/componenttransfer-funcnode.cpp it reports a dereference of a null pointer, but probably only because it cannot be sure that the pointer is not null, however, as a human I would say that this pointer should not be null, unless there is a bug elsewhere. So would it be possible to give a kind of precondition for this function? So that it doesn't complain inside the function, but rather whenever this function might be called with null pointer?