From patchwork Tue Dec 1 13:03:54 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Armbruster X-Patchwork-Id: 550833 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 51C1314029C for ; Wed, 2 Dec 2015 00:04:18 +1100 (AEDT) Received: from localhost ([::1]:52470 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a3kbQ-0006dE-6A for incoming@patchwork.ozlabs.org; Tue, 01 Dec 2015 08:04:16 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45946) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a3kbA-0006KK-Iq for qemu-devel@nongnu.org; Tue, 01 Dec 2015 08:04:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a3kb7-0004Bq-D6 for qemu-devel@nongnu.org; Tue, 01 Dec 2015 08:04:00 -0500 Received: from mx1.redhat.com ([209.132.183.28]:40250) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a3kb7-0004BX-7G for qemu-devel@nongnu.org; Tue, 01 Dec 2015 08:03:57 -0500 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id B123233A8BA for ; Tue, 1 Dec 2015 13:03:56 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-116-73.ams2.redhat.com [10.36.116.73]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id tB1D3sTs016503 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 1 Dec 2015 08:03:56 -0500 Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 64464303F16C; Tue, 1 Dec 2015 14:03:54 +0100 (CET) From: Markus Armbruster To: qemu-devel@nongnu.org Date: Tue, 1 Dec 2015 14:03:54 +0100 Message-Id: <1448975034-1314-1-git-send-email-armbru@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: pbonzini@redhat.com Subject: [Qemu-devel] [PATCH] coverity: Model g_poll() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Coverity now reports two more CHECKED_RETURN: * qemu-char.c:1248: Should be fixed by Paolo's "qemu-char: retry g_poll on EINTR". * migration/qemu-file-unix.c:75: if g_poll() fails, we retry sending before the file descriptor is ready. Errors other than EINTR are mostly theoretical, though. Signed-off-by: Markus Armbruster --- scripts/coverity-model.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/scripts/coverity-model.c b/scripts/coverity-model.c index e1d5f45..ee5bf9d 100644 --- a/scripts/coverity-model.c +++ b/scripts/coverity-model.c @@ -342,6 +342,15 @@ char *g_strconcat(const char *s, ...) /* Other glib functions */ +typedef struct pollfd GPollFD; + +int poll(); + +int g_poll (GPollFD *fds, unsigned nfds, int timeout) +{ + return poll(fds, nfds, timeout); +} + typedef struct _GIOChannel GIOChannel; GIOChannel *g_io_channel_unix_new(int fd) {