From patchwork Fri Sep 30 14:45:15 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ferruh Yigit X-Patchwork-Id: 16319 X-Patchwork-Delegate: bruce.richardson@intel.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id A6DFE56A1; Fri, 30 Sep 2016 16:45:24 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 516F82B86 for ; Fri, 30 Sep 2016 16:45:23 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP; 30 Sep 2016 07:45:22 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos; i="5.31,273,1473145200"; d="scan'208"; a="1058793877" Received: from sivswdev02.ir.intel.com ([10.237.217.46]) by orsmga002.jf.intel.com with ESMTP; 30 Sep 2016 07:45:18 -0700 From: Ferruh Yigit To: dev@dpdk.org Cc: Sony Chacko ; Harish Patil ; Rasesh Mody Date: Fri, 30 Sep 2016 15:45:15 +0100 Message-Id: <20160930144515.1770-1-ferruh.yigit@intel.com> X-Mailer: git-send-email 2.8.4 Subject: [dpdk-dev] [PATCH] net/bnx2x: fix icc build error X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" When bnx2x debug config enabled, icc (ICC) 17.0.0 20160721 gives the following compilation error: .../drivers/net/bnx2x/elink.c(6682): error #3656: variable "fw_ver1" may be used before its value is set PMD_DRV_LOG(DEBUG, ^ According logic in the code, this error is a false positive, but since this is not in the fast path, fixing compiler error by assigning initial value to variable. Signed-off-by: Ferruh Yigit Acked-by: Rasesh Mody --- drivers/net/bnx2x/elink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/bnx2x/elink.c b/drivers/net/bnx2x/elink.c index 149cc97..d9a72f0 100644 --- a/drivers/net/bnx2x/elink.c +++ b/drivers/net/bnx2x/elink.c @@ -6645,7 +6645,7 @@ static elink_status_t elink_8073_8727_external_rom_boot(struct bnx2x_softc *sc, uint8_t port) { uint32_t count = 0; - uint16_t fw_ver1, fw_msgout; + uint16_t fw_ver1 = 0, fw_msgout; elink_status_t rc = ELINK_STATUS_OK; /* Boot port from external ROM */