From mboxrd@z Thu Jan 1 00:00:00 1970 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) From: Markus Armbruster Date: Tue, 1 Dec 2015 14:03:54 +0100 Message-Id: <1448975034-1314-1-git-send-email-armbru@redhat.com> Subject: [Qemu-devel] [PATCH] coverity: Model g_poll() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: pbonzini@redhat.com 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) { -- 2.4.3