From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id B03632C09 for ; Mon, 17 Oct 2016 14:11:45 +0200 (CEST) Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga102.fm.intel.com with ESMTP; 17 Oct 2016 05:11:44 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,357,1473145200"; d="scan'208";a="20364949" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.237.220.83]) ([10.237.220.83]) by fmsmga005.fm.intel.com with ESMTP; 17 Oct 2016 05:11:43 -0700 To: dev@dpdk.org References: <20160930144515.1770-1-ferruh.yigit@intel.com> Cc: Sony Chacko , Harish Patil , Rasesh Mody From: Ferruh Yigit Message-ID: <12674be5-bed0-6e61-7506-b6bb19460c97@intel.com> Date: Mon, 17 Oct 2016 13:11:43 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <20160930144515.1770-1-ferruh.yigit@intel.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [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: , X-List-Received-Date: Mon, 17 Oct 2016 12:11:46 -0000 On 9/30/2016 3:45 PM, Ferruh Yigit wrote: > 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 */ > Since this is an compilation fix, I believe it is good to have this in the release, can you please review the patch? Thanks, ferruh