From patchwork Wed Jul 13 09:24:19 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jan Viktorin X-Patchwork-Id: 14804 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 9265E2B98; Wed, 13 Jul 2016 11:25:02 +0200 (CEST) Received: from wes1-so1.wedos.net (wes1-so1.wedos.net [46.28.106.15]) by dpdk.org (Postfix) with ESMTP id 27FF01C52 for ; Wed, 13 Jul 2016 11:25:01 +0200 (CEST) Received: from pcviktorin.fit.vutbr.cz (pcviktorin.fit.vutbr.cz [147.229.13.147]) by wes1-so1.wedos.net (Postfix) with ESMTPSA id 3rqD246b5qz5Ww; Wed, 13 Jul 2016 11:25:00 +0200 (CEST) From: Jan Viktorin To: dev@dpdk.org Cc: Jan Viktorin , Jianfeng Tan , Yuanhan Liu , Huawei Xie Date: Wed, 13 Jul 2016 11:24:19 +0200 Message-Id: <20160713092419.14425-1-viktorin@rehivetech.com> X-Mailer: git-send-email 2.9.0 MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH] virtio: fix missing curly braces X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" GCC 6 is complaining and seems to be correct here. virtio_user_ethdev.c:345:2: error: this ‘if’ clause does not guard... [-Werror=misleading-indentation] if (rte_kvargs_count(kvlist, VIRTIO_USER_ARG_PATH) == 1) ^~ virtio_user_ethdev.c:348:3: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘if’ if (ret < 0) { Fixes: 404bd6bfe360 ("net/virtio-user: fix return value not checked") Signed-off-by: Jan Viktorin --- drivers/net/virtio/virtio_user_ethdev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/virtio/virtio_user_ethdev.c b/drivers/net/virtio/virtio_user_ethdev.c index 17d5848..1b903f3 100644 --- a/drivers/net/virtio/virtio_user_ethdev.c +++ b/drivers/net/virtio/virtio_user_ethdev.c @@ -342,7 +342,7 @@ virtio_user_pmd_devinit(const char *name, const char *params) goto end; } - if (rte_kvargs_count(kvlist, VIRTIO_USER_ARG_PATH) == 1) + if (rte_kvargs_count(kvlist, VIRTIO_USER_ARG_PATH) == 1) { ret = rte_kvargs_process(kvlist, VIRTIO_USER_ARG_PATH, &get_string_arg, &path); if (ret < 0) { @@ -350,7 +350,7 @@ virtio_user_pmd_devinit(const char *name, const char *params) VIRTIO_USER_ARG_PATH); goto end; } - else { + } else { PMD_INIT_LOG(ERR, "arg %s is mandatory for virtio-user\n", VIRTIO_USER_ARG_QUEUE_SIZE); goto end;