From 08731368c9fc5effbb6286437da4b6825e305ca7 Mon Sep 17 00:00:00 2001 From: Mark Kavanagh Date: Mon, 9 Oct 2017 14:59:30 +0100 Subject: [PATCH] net/bnxt: fix build MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit For gcc (GCC) 4.8.3 20140911 (Red Hat 4.8.3-7), As of 5ef3b79fdfe6f, compilation of DPDK fails with the following ERROR MESSAGE: "bnxt_filter.c:960:117: error: ‘vnic’ may be used uninitialized in this function [-Werror=maybe-uninitialized]". Resolve this by initializing 'vnic' to NULL; Fixes: 5ef3b79fdfe6 ("net/bnxt: support flow filter ops") Signed-off-by: Mark Kavanagh --- drivers/net/bnxt/bnxt_filter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/bnxt/bnxt_filter.c b/drivers/net/bnxt/bnxt_filter.c index d470be259b..9f171fd995 100644 --- a/drivers/net/bnxt/bnxt_filter.c +++ b/drivers/net/bnxt/bnxt_filter.c @@ -906,7 +906,7 @@ bnxt_flow_create(struct rte_eth_dev *dev, { struct bnxt *bp = (struct bnxt *)dev->data->dev_private; struct bnxt_filter_info *filter; - struct bnxt_vnic_info *vnic; + struct bnxt_vnic_info *vnic = NULL; struct rte_flow *flow; unsigned int i; int ret = 0; -- 2.20.1