From: Ferruh Yigit Date: Tue, 13 Jun 2017 16:42:10 +0000 (+0100) Subject: net/enic: fix build with gcc 7.1 X-Git-Tag: spdx-start~3009 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=a45962823d863890265bd9033be09a33afb6199f;p=dpdk.git 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: 9913fbb91df0 ("enic/base: common code") Cc: stable@dpdk.org Signed-off-by: Ferruh Yigit --- diff --git a/drivers/net/enic/base/vnic_dev.c b/drivers/net/enic/base/vnic_dev.c index 7b3aed31a9..49b36555b7 100644 --- a/drivers/net/enic/base/vnic_dev.c +++ b/drivers/net/enic/base/vnic_dev.c @@ -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;