net/bnxt: fix build
authorMark Kavanagh <mark.b.kavanagh@intel.com>
Mon, 9 Oct 2017 13:59:30 +0000 (14:59 +0100)
committerFerruh Yigit <ferruh.yigit@intel.com>
Thu, 12 Oct 2017 00:36:58 +0000 (01:36 +0100)
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 <mark.b.kavanagh@intel.com>
drivers/net/bnxt/bnxt_filter.c

index d470be2..9f171fd 100644 (file)
@@ -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;