From nobody Thu May 2 17:57:19 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 149096837403130.69594794607815; Fri, 31 Mar 2017 06:52:54 -0700 (PDT) Received: from localhost ([::1]:41199 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ctwyy-0007Ir-Mn for importer@patchew.org; Fri, 31 Mar 2017 09:52:52 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52372) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ctwy3-0006sd-0D for qemu-devel@nongnu.org; Fri, 31 Mar 2017 09:51:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ctwy2-0000XG-5A for qemu-devel@nongnu.org; Fri, 31 Mar 2017 09:51:55 -0400 Received: from orth.archaic.org.uk ([2001:8b0:1d0::2]:49014) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ctwy1-0000WC-UC for qemu-devel@nongnu.org; Fri, 31 Mar 2017 09:51:54 -0400 Received: from pm215 by orth.archaic.org.uk with local (Exim 4.84_2) (envelope-from ) id 1ctwxy-0004Al-CB; Fri, 31 Mar 2017 14:51:50 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Date: Fri, 31 Mar 2017 14:51:49 +0100 Message-Id: <1490968309-13672-1-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 2.7.4 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:8b0:1d0::2 Subject: [Qemu-devel] [PATCH] main_loop: Make main_loop_wait() return void X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , patches@linaro.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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. I guess this will make the compiler warn about ret being set and never used if CONFIG_SLIRP is not defined, which is irritating. I'm postponing messing about with fixing that in favour of seeing whether anybody has a good answer to the question above (which might make it moot). --- include/qemu/main-loop.h | 2 +- util/main-loop.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/qemu/main-loop.h b/include/qemu/main-loop.h index d7e24af..6b4b60b 100644 --- a/include/qemu/main-loop.h +++ b/include/qemu/main-loop.h @@ -79,7 +79,7 @@ int qemu_init_main_loop(Error **errp); * * @nonblocking: Whether the caller should block until an event occurs. */ -int main_loop_wait(int nonblocking); +void main_loop_wait(int nonblocking); =20 /** * qemu_get_aio_context: Return the main loop's AioContext diff --git a/util/main-loop.c b/util/main-loop.c index 4534c89..d0e27f3 100644 --- a/util/main-loop.c +++ b/util/main-loop.c @@ -476,7 +476,7 @@ static int os_host_main_loop_wait(int64_t timeout) } #endif =20 -int main_loop_wait(int nonblocking) +void main_loop_wait(int nonblocking) { int ret; uint32_t timeout =3D UINT32_MAX; @@ -513,7 +513,7 @@ int main_loop_wait(int nonblocking) qemu_start_warp_timer(); qemu_clock_run_all_timers(); =20 - return ret; + return; } =20 /* Functions to operate on the main QEMU AioContext. */ --=20 2.7.4