Skip to contentSkip to conversation

virtio: fix missing curly braces

PATCH In review Jan Viktorin 2 participants 5 messages Jul 13, 2016 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 virtio: fix missing curly braces

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")
---
 drivers/net/virtio/virtio_user_ethdev.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/virtio/virtio_user_ethdev.c +2 -2
index 17d5848..1b903f3 100644
@@ -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;
Signature · 1 line
2.9.0
#1 lore raw

Hi Jan,

Quoted 7 lines · Jan Viktorin

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)
^~

Quoted 9 lines

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")

---

I already fixed it yesterday:
http://dpdk.org/dev/patchwork/patch/14780/

Thanks,
Maxime

#2 lore raw
Quoted 15 lines · On Wed, 13 Jul 2016 11:27:18 +0200 Maxime Coquelin…

Hi Jan,

Quoted 12 lines · Jan Viktorin

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) {

Quoted 6 lines
Quoted 4 lines
Fixes 404bd6bfe360 ("net/virtio-user: fix return value not checked")

---

I already fixed it yesterday:
http://dpdk.org/dev/patchwork/patch/14780/

Sorry, I didn't find it quickly. My fault. Thanks.

Jan

Quoted 3 lines

Thanks,
Maxime

#3 lore raw
In reply to Maxime Coquelin
Quoted 15 lines · On Wed, 13 Jul 2016 11:27:18 +0200 Maxime Coquelin…

Hi Jan,

Quoted 12 lines · Jan Viktorin

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) {

Quoted 6 lines
Quoted 4 lines
Fixes 404bd6bfe360 ("net/virtio-user: fix return value not checked")

---

I already fixed it yesterday:
http://dpdk.org/dev/patchwork/patch/14780/

Sorry, I didn't find it quickly. My fault. Thanks.

Jan

Quoted 3 lines

Thanks,
Maxime

Signature · 4 lines
  Jan Viktorin                E-mail: [email protected]
  System Architect            Web:    www.RehiveTech.com
  RehiveTech
  Brno, Czech Republic
#4 lore raw
Quoted 18 lines · Jan Viktorin
Quoted 15 lines · On Wed, 13 Jul 2016 11:27:18 +0200 Maxime Coquelin…

Hi Jan,

Quoted 12 lines · Jan Viktorin

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) {

Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
Fixes 404bd6bfe360 ("net/virtio-user: fix return value not checked")

---

I already fixed it yesterday:
http://dpdk.org/dev/patchwork/patch/14780/

Sorry, I didn't find it quickly. My fault. Thanks.

Oh no problem! Better having two fixes than none :)

Thanks,
Maxime