From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ferruh Yigit Subject: [PATCH] net/bnx2x: fix icc build error Date: Fri, 30 Sep 2016 15:45:15 +0100 Message-ID: <20160930144515.1770-1-ferruh.yigit@intel.com> Cc: Sony Chacko ; Harish Patil ; Rasesh Mody To: dev@dpdk.org Return-path: 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) 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 --- 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 */ -- 2.7.4