net/enic: fix build with GCC 7.5
authorFerruh Yigit <ferruh.yigit@intel.com>
Fri, 15 Oct 2021 10:28:18 +0000 (11:28 +0100)
committerFerruh Yigit <ferruh.yigit@intel.com>
Mon, 18 Oct 2021 15:53:17 +0000 (17:53 +0200)
commit54fe0cf1b8682684ba8a8778669483867343798e
tree30b9c23d58a67e0d8eb5de53fbd3ea449ab69577
parentd2e5ab2b42444cd7149823fbba29a1227fc2b5cb
net/enic: fix build with GCC 7.5

Build error:
../drivers/net/enic/enic_fm_flow.c: In function 'enic_fm_flow_parse':
../drivers/net/enic/enic_fm_flow.c:1467:24:
error: 'dev' may be used uninitialized in this function
[-Werror=maybe-uninitialized]
    struct rte_eth_dev *dev;
                        ^~~
../drivers/net/enic/enic_fm_flow.c:1580:24:
error: 'dev' may be used uninitialized in this function
[-Werror=maybe-uninitialized]
    struct rte_eth_dev *dev;
                        ^~~
../drivers/net/enic/enic_fm_flow.c:1599:24:
error: 'dev' may be used uninitialized in this function
[-Werror=maybe-uninitialized]
    struct rte_eth_dev *dev;
                        ^~~

Build error looks like false positive, but to silence the compiler
initializing the pointer with NULL.

Bugzilla ID: 812
Fixes: 54bd4ebe8b05 ("net/enic: support meta flow actions to overrule destinations")

Reported-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
drivers/net/enic/enic_fm_flow.c