[Libguestfs] two small patches to appease clang/llvm static analysis

Jim Meyering jim at meyering.net
Tue Sep 1 08:53:23 UTC 2009


Matthew Booth wrote:
> On 31/08/09 20:45, Jim Meyering wrote:
>> I ran libguestfs through llvm+clang, today,
>> [http://clang.llvm.org/StaticAnalysis.html]
>>
>> It found only two things worth changing -- neither is a real problems.
>>
>> Adding the noreturn makes it so the tool understands line 541 of
>> guestfs.c is truly reachable only for non-NULL "p":
>>
>>    540	 if (!p) g->abort_cb ();
>>    541	 memcpy (p, ptr, size);
>>
...
>
> ACK for both of these.

Thanks.  Pushed.

> One for Rich when he gets back is whether these function pointers
> remain worthwhile. IIRC they were intended to be used when integrating
> with an external main loop, which I believe has fallen out of
> favour. I don't see any of these functions being replaced, so calling
> them directly might simplify things a little.




More information about the Libguestfs mailing list