net/vmxnet3: fix build with gcc 7
authorBruce Richardson <bruce.richardson@intel.com>
Thu, 4 May 2017 15:38:17 +0000 (16:38 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Fri, 5 May 2017 16:36:42 +0000 (18:36 +0200)
GCC 7 flags a value as uninitialized before used. While it's a false
positive, there is little harm in providing an initial value for the
variable.

Fixes: bb1d14b87fc3 ("vmxnet3: fix link state handling")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
drivers/net/vmxnet3/vmxnet3_ethdev.c

index 0e8eb75..98252bb 100644 (file)
@@ -935,7 +935,7 @@ vmxnet3_dev_link_update(struct rte_eth_dev *dev,
                        __rte_unused int wait_to_complete)
 {
        struct vmxnet3_hw *hw = dev->data->dev_private;
-       struct rte_eth_link old, link;
+       struct rte_eth_link old = { 0 }, link;
        uint32_t ret;
 
        /* Link status doesn't change for stopped dev */