From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 639AD559A; Tue, 13 Jun 2017 18:42:28 +0200 (CEST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga104.jf.intel.com with ESMTP; 13 Jun 2017 09:42:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.39,338,1493708400"; d="scan'208";a="1140846275" Received: from silpixa00372839.ir.intel.com (HELO silpixa00372839.ger.corp.intel.com) ([10.237.222.154]) by orsmga001.jf.intel.com with ESMTP; 13 Jun 2017 09:42:16 -0700 From: Ferruh Yigit To: John Daley , Nelson Escobar Cc: dev@dpdk.org, Ferruh Yigit , stable@dpdk.org Date: Tue, 13 Jun 2017 17:42:10 +0100 Message-Id: <20170613164212.42374-3-ferruh.yigit@intel.com> X-Mailer: git-send-email 2.13.0 In-Reply-To: <20170613164212.42374-1-ferruh.yigit@intel.com> References: <20170613164212.42374-1-ferruh.yigit@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH 3/5] net/enic: fix build with gcc 7.1 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jun 2017 16:42:29 -0000 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 --- drivers/net/enic/base/vnic_dev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/enic/base/vnic_dev.c b/drivers/net/enic/base/vnic_dev.c index 7b3aed31a..49b36555b 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; -- 2.13.0