[dpdk-dev] [PATCH 05/10] net/vmxnet3: fix compile error with gcc 7
Bruce Richardson
bruce.richardson at intel.com
Thu May 4 17:38:17 CEST 2017
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 at intel.com>
---
drivers/net/vmxnet3/vmxnet3_ethdev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vmxnet3_ethdev.c
index 0e8eb75..1cd72c1 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 */
--
2.9.3
More information about the dev
mailing list