qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] main_loop: Make main_loop_wait() return void


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH] main_loop: Make main_loop_wait() return void
Date: Tue, 30 May 2017 15:08:34 +0100

On 31 March 2017 at 15:10, Eric Blake <address@hidden> wrote:
> On 03/31/2017 08:51 AM, Peter Maydell wrote:
>> In commit e330c118f2a5a the last usage of main_loop_wait() that cared
>> about the return value was changed to no longer use it. Drop the
>> now-useless return value and make the function return void.
>>
>> Signed-off-by: Peter Maydell <address@hidden>
>> ---
>> Coverity complains (CID 1372464) about main_loop() calling
>> main_loop_wait() and ignoring its return value. I suspect
>> this change will just displace that to within main_loop_wait()
>> itself since the underlying issue there is "the ppoll() that
>> gets called to poll fds can return an error code, but what
>> do we do if it does?". Suggestions on that point welcome.
>
> At one point, there was a suggestion to introduce an ignore_value()
> macro that ignores values that the compiler/coverity would otherwise
> complain about, in contexts where we really are okay ignoring the value.
>  If making main_loop_wait() return void shifts where Coverity blames,
> then ignore_value(ppoll()) seems like it might help.

Mmm, but my question really is "is ignoring the error code
from the syscall the correct thing to do?"... though I'm
not sure what else we would want to do (log a warning?
abort?).

thanks
-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]