[dpdk-dev] net/virtio-user: Fix missing brackets in if condition

Yuanhan Liu yuanhan.liu at linux.intel.com
Fri Jul 15 03:29:12 CEST 2016


On Thu, Jul 14, 2016 at 06:31:11PM +0200, viktorin at rehivetech.com wrote:
> On Tue, 12 Jul 2016 11:30:25 +0200
> Maxime Coquelin <maxime.coquelin at redhat.com> wrote:
> 
> > The error is reported using test build script:
> 
> I recommend to note that the error is reported only by GCC 6+.

Agreed!

	--yliu
> 
> > 
> > $ scripts/test-build.sh x86_64-native-linuxapp-gcc
> > ...
> > drivers/net/virtio/virtio_user_ethdev.c: In function ‘virtio_user_pmd_devinit’:
> > 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")
> > 
> > Cc: Jianfeng Tan <jianfeng.tan at intel.com>
> > Signed-off-by: Maxime Coquelin <maxime.coquelin at redhat.com>
> > Acked-by: Yuanhan Liu <yuanhan.liu at linux.intel.com>
> > 
> Reviewed-by: Jan Viktorin <viktorin at rehivetech.com>


More information about the dev mailing list