From patchwork Sun Mar 8 18:17:54 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Weil X-Patchwork-Id: 447807 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 EA94C1401AC for ; Mon, 9 Mar 2015 05:18:18 +1100 (AEDT) Received: from localhost ([::1]:39980 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YUfmK-0000Cy-QT for incoming@patchwork.ozlabs.org; Sun, 08 Mar 2015 14:18:16 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49608) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YUfm4-0000Cq-Me for qemu-devel@nongnu.org; Sun, 08 Mar 2015 14:18:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YUfm1-0005ht-Dw for qemu-devel@nongnu.org; Sun, 08 Mar 2015 14:18:00 -0400 Received: from qemu.weilnetz.de ([37.221.198.45]:46090) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YUfm1-0005hh-43; Sun, 08 Mar 2015 14:17:57 -0400 Received: by qemu.weilnetz.de (Postfix, from userid 1000) id A036117F9E9; Sun, 8 Mar 2015 19:17:54 +0100 (CET) From: Stefan Weil To: QEMU Trivial Date: Sun, 8 Mar 2015 19:17:54 +0100 Message-Id: <1425838674-28393-1-git-send-email-sw@weilnetz.de> X-Mailer: git-send-email 1.7.10.4 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 37.221.198.45 Cc: "Aneesh Kumar K.V" , Stefan Weil , QEMU Developer , "Michael S. Tsirkin" Subject: [Qemu-devel] [PATCH 2/7] 9pfs: Fix warnings from Sparse 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 Sparse report: 9pfs/virtio-9p.c:1953:9: warning: returning void-valued expression 9pfs/virtio-9p-handle.c:143:5: warning: returning void-valued expression 9pfs/virtio-9p-handle.c:160:5: warning: returning void-valued expression 9pfs/virtio-9p-local.c:384:5: warning: returning void-valued expression 9pfs/virtio-9p-local.c:415:5: warning: returning void-valued expression 9pfs/virtio-9p-proxy.c:672:5: warning: returning void-valued expression 9pfs/virtio-9p-proxy.c:689:5: warning: returning void-valued expression Cc: Michael S. Tsirkin Cc: Aneesh Kumar K.V Signed-off-by: Stefan Weil Reviewed-by: Aneesh Kumar K.V --- hw/9pfs/virtio-9p-handle.c | 4 ++-- hw/9pfs/virtio-9p-local.c | 4 ++-- hw/9pfs/virtio-9p-proxy.c | 4 ++-- hw/9pfs/virtio-9p.c | 3 ++- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/hw/9pfs/virtio-9p-handle.c b/hw/9pfs/virtio-9p-handle.c index 4b79cef..13eabb9 100644 --- a/hw/9pfs/virtio-9p-handle.c +++ b/hw/9pfs/virtio-9p-handle.c @@ -140,7 +140,7 @@ static int handle_opendir(FsContext *ctx, static void handle_rewinddir(FsContext *ctx, V9fsFidOpenState *fs) { - return rewinddir(fs->dir); + rewinddir(fs->dir); } static off_t handle_telldir(FsContext *ctx, V9fsFidOpenState *fs) @@ -157,7 +157,7 @@ static int handle_readdir_r(FsContext *ctx, V9fsFidOpenState *fs, static void handle_seekdir(FsContext *ctx, V9fsFidOpenState *fs, off_t off) { - return seekdir(fs->dir, off); + seekdir(fs->dir, off); } static ssize_t handle_preadv(FsContext *ctx, V9fsFidOpenState *fs, diff --git a/hw/9pfs/virtio-9p-local.c b/hw/9pfs/virtio-9p-local.c index a183eee..fec580b 100644 --- a/hw/9pfs/virtio-9p-local.c +++ b/hw/9pfs/virtio-9p-local.c @@ -381,7 +381,7 @@ static int local_opendir(FsContext *ctx, static void local_rewinddir(FsContext *ctx, V9fsFidOpenState *fs) { - return rewinddir(fs->dir); + rewinddir(fs->dir); } static off_t local_telldir(FsContext *ctx, V9fsFidOpenState *fs) @@ -412,7 +412,7 @@ again: static void local_seekdir(FsContext *ctx, V9fsFidOpenState *fs, off_t off) { - return seekdir(fs->dir, off); + seekdir(fs->dir, off); } static ssize_t local_preadv(FsContext *ctx, V9fsFidOpenState *fs, diff --git a/hw/9pfs/virtio-9p-proxy.c b/hw/9pfs/virtio-9p-proxy.c index 59c7445..edab402 100644 --- a/hw/9pfs/virtio-9p-proxy.c +++ b/hw/9pfs/virtio-9p-proxy.c @@ -669,7 +669,7 @@ static int proxy_opendir(FsContext *ctx, static void proxy_rewinddir(FsContext *ctx, V9fsFidOpenState *fs) { - return rewinddir(fs->dir); + rewinddir(fs->dir); } static off_t proxy_telldir(FsContext *ctx, V9fsFidOpenState *fs) @@ -686,7 +686,7 @@ static int proxy_readdir_r(FsContext *ctx, V9fsFidOpenState *fs, static void proxy_seekdir(FsContext *ctx, V9fsFidOpenState *fs, off_t off) { - return seekdir(fs->dir, off); + seekdir(fs->dir, off); } static ssize_t proxy_preadv(FsContext *ctx, V9fsFidOpenState *fs, diff --git a/hw/9pfs/virtio-9p.c b/hw/9pfs/virtio-9p.c index 5861a5b..4964da0 100644 --- a/hw/9pfs/virtio-9p.c +++ b/hw/9pfs/virtio-9p.c @@ -1950,7 +1950,8 @@ static void v9fs_write(void *opaque) err = pdu_unmarshal(pdu, offset, "dqd", &fid, &off, &count); if (err < 0) { - return complete_pdu(s, pdu, err); + complete_pdu(s, pdu, err); + return; } offset += err; v9fs_init_qiov_from_pdu(&qiov_full, pdu, offset, count, true);