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

Re: [libvirt] [PATCH] virFork: placate static analyzers: ignore pthread_sigmask return value



Laine Stump wrote:
> On 02/19/2010 12:41 PM, Jim Meyering wrote:
>> Since we check all other uses of pthread_sigmask, be consistent
>> and clear: mark that we're deliberately ignoring this one.
>
> Ah, right. I didn't think of that (and my compiler didn't
> complain. What target didn't I run / cflag didn't I set? I know you
> sent mail about it awhile back, but I'm not firing on enough cylinders
> right now to go looking for it ;-))

That was reported by coverity.
I don't know if clang could detect it.

gcc currently doesn't do enough static analysis to notice that,
but could be made to warn if we gave that function the
warn_unused_result attribute.  Though in this case, it's really
not important.  No harm in ignoring, since the only possible failure
appears to be EINVAL, which you'd get for passing it an invalid arg.
I wrote the patch solely to suppress the false-positive warning.


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