From: Bruce Richardson Date: Thu, 4 May 2017 15:38:17 +0000 (+0100) Subject: net/vmxnet3: fix build with gcc 7 X-Git-Tag: spdx-start~3264 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=2fff4ff7b77d6b9054b9c894d0a78fe5ebd0d746;p=dpdk.git net/vmxnet3: fix build with gcc 7 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 --- diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vmxnet3_ethdev.c index 0e8eb75bf9..98252bb6a1 100644 --- a/drivers/net/vmxnet3/vmxnet3_ethdev.c +++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c @@ -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 */