From: Maxime Coquelin Date: Tue, 12 Jul 2016 09:30:25 +0000 (+0200) Subject: net/virtio-user: fix build with gcc 6 X-Git-Tag: spdx-start~6162 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=9cca159efa1ebe0463a2805d309394c9eb1b532a;p=dpdk.git net/virtio-user: fix build with gcc 6 The error is reported using test build script: $ scripts/test-build.sh x86_64-native-linuxapp-gcc ... drivers/net/virtio/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) ^~ Fixes: 404bd6bfe360 ("net/virtio-user: fix return value not checked") Signed-off-by: Maxime Coquelin Acked-by: Yuanhan Liu --- diff --git a/drivers/net/virtio/virtio_user_ethdev.c b/drivers/net/virtio/virtio_user_ethdev.c index 782d7d38b1..6b4f66e924 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;