From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48881) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dFhpR-0005be-Ld for qemu-devel@nongnu.org; Tue, 30 May 2017 10:08:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dFhpQ-0002JS-O0 for qemu-devel@nongnu.org; Tue, 30 May 2017 10:08:57 -0400 Received: from mail-wr0-x22a.google.com ([2a00:1450:400c:c0c::22a]:34609) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dFhpQ-0002JM-H9 for qemu-devel@nongnu.org; Tue, 30 May 2017 10:08:56 -0400 Received: by mail-wr0-x22a.google.com with SMTP id g76so1415098wrd.1 for ; Tue, 30 May 2017 07:08:56 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: <1490968309-13672-1-git-send-email-peter.maydell@linaro.org> From: Peter Maydell Date: Tue, 30 May 2017 15:08:34 +0100 Message-ID: Content-Type: text/plain; charset="UTF-8" Subject: Re: [Qemu-devel] [PATCH] main_loop: Make main_loop_wait() return void List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: QEMU Developers , Paolo Bonzini , "patches@linaro.org" On 31 March 2017 at 15:10, Eric Blake 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 >> --- >> 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