[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH] storage_backend.c: assure clang that inputvol can't be NULL

Daniel P. Berrange wrote:

> On Thu, Sep 03, 2009 at 11:18:00AM +0200, Jim Meyering wrote:
>> clang was complaining that a NULL inputvol would be dereferenced
>> in that "could not open..." diagnostic.
>> Since the two sole callers of this function are careful
>> to call it only when inputvol is non-NULL, this is a good
>> case for giving the parameter the nonnull attribute:
> ACK.
> BTW, how exactly are you getting all these warnings/diagnostics ?
> Are you merely compiling libvirt using clang & just collecting
> the warnings, or is this some special static analysis tool ?
> If we're going to start adding these non-null attributes, then
> I should hook the appropriate tool into autobuild.sh to validate
> them regularly.


I built llvm/clang per instructions here:


Than ran them like this:

    scan-build -o clang ./autogen.sh
    scan-build -o clang make

That produces a bunch of html in the -o-specified dierctory, clang/.
Point your browser at clang/*/index.html to view the results.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]