net/enic: fix build with gcc 7.1
build error:
.../dpdk/drivers/net/enic/base/vnic_dev.c:
In function ‘vnic_dev_get_mac_addr’:
.../dpdk/drivers/net/enic/base/vnic_dev.c:470:12:
error: ‘a0’ is used uninitialized in this function
[-Werror=uninitialized]
args[0] = *a0;
^~~
...dpdk/drivers/net/enic/base/vnic_dev.c:
In function ‘vnic_dev_classifier’:
...dpdk/drivers/net/enic/base/vnic_dev.c:471:12:
error: ‘a1’ may be used uninitialized in this function
[-Werror=maybe-uninitialized]
args[1] = *a1;
^~~
Fixed by providing initial values.
Fixes: 9913fbb91d
("enic/base: common code")
Cc: stable@dpdk.org
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
This commit is contained in:
parent
92c0b132f2
commit
a45962823d
@ -752,7 +752,7 @@ int vnic_dev_soft_reset_done(struct vnic_dev *vdev, int *done)
|
||||
|
||||
int vnic_dev_get_mac_addr(struct vnic_dev *vdev, u8 *mac_addr)
|
||||
{
|
||||
u64 a0, a1 = 0;
|
||||
u64 a0 = 0, a1 = 0;
|
||||
int wait = 1000;
|
||||
int err, i;
|
||||
|
||||
@ -1129,7 +1129,7 @@ int vnic_dev_set_mac_addr(struct vnic_dev *vdev, u8 *mac_addr)
|
||||
int vnic_dev_classifier(struct vnic_dev *vdev, u8 cmd, u16 *entry,
|
||||
struct filter_v2 *data, struct filter_action_v2 *action_v2)
|
||||
{
|
||||
u64 a0, a1;
|
||||
u64 a0 = 0, a1 = 0;
|
||||
int wait = 1000;
|
||||
dma_addr_t tlv_pa;
|
||||
int ret = -EINVAL;
|
||||
|
Loading…
Reference in New Issue
Block a user