From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olivier MATZ Subject: Re: [PATCH 04/10] net/i40e: fix compilation with -Og Date: Wed, 11 Oct 2017 09:52:37 +0200 Message-ID: <20171011075236.dajqfbb456etfa5g@platinum> References: <20170911151333.5727-1-olivier.matz@6wind.com> <20170911151333.5727-5-olivier.matz@6wind.com> <9BB6961774997848B5B42BEC655768F810E911C1@SHSMSX103.ccr.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Cc: "Yigit, Ferruh" , "dev@dpdk.org" , "Xing, Beilei" To: "Wu, Jingjing" Return-path: Received: from mail.droids-corp.org (zoll.droids-corp.org [94.23.50.67]) by dpdk.org (Postfix) with ESMTP id B5575532E for ; Wed, 11 Oct 2017 09:52:45 +0200 (CEST) Content-Disposition: inline In-Reply-To: <9BB6961774997848B5B42BEC655768F810E911C1@SHSMSX103.ccr.corp.intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Wed, Oct 11, 2017 at 06:20:35AM +0000, Wu, Jingjing wrote: > > > > -----Original Message----- > > From: Yigit, Ferruh > > Sent: Friday, October 6, 2017 7:25 AM > > To: Olivier Matz ; dev@dpdk.org; Wu, Jingjing > > ; Xing, Beilei > > Subject: Re: [dpdk-dev] [PATCH 04/10] net/i40e: fix compilation with -Og > > > > On 9/11/2017 4:13 PM, Olivier Matz wrote: > > > The compilation with gcc-6.3.0 and EXTRA_CFLAGS=-Og gives the > > > following > > > error: > > > > > > CC i40e_adminq.o > > > i40e_adminq.c: In function ‘i40e_clean_arq_element’: > > > i40e_adminq.c:1145:56: error: ‘ntu’ may be used uninitialized in > > > this function [-Werror=maybe-uninitialized] > > > *pending = (ntc > ntu ? hw->aq.arq.count : 0) + (ntu - ntc); > > > ~~~~~^~~~~~ > > > > > > Depending on what is defined, ntu actually be used without being > > > initialized. Fix it by initializing it to 0, despite this is probably > > > not the proper fix. Moreover, the error is located in base/ directory, > > > which contains driver code common to several platforms (not only dpdk). > > > > This practically seems false positive because driver makefile hard-coded both > > defines. > > > > Also ntu used before this location, not sure warning generated for here. > > > > Overall I am for fixing the compile warning, but for decision maintainer cc'ed > > because this being base code update requires maintainer communicate other > > channels to reflect update into base code. > > > Right, for base code, we are getting them from internal release. > In principle, based code would keep unchanged until the base code update. > > I will go to report this issue to base code develop team, and then make > It be fixed in next base code drop. Is that OK? Fine to me, thanks.