From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: Compilation errors in drivers/event/opdl/ Date: Sun, 21 Jan 2018 09:34:58 -0800 Message-ID: <20180121093458.082f4589@xeon-e3> References: <20236883.VkVyGBRfOF@xps> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: "Patil, Harish" , "liang.j.ma@intel.com" , "peter.mccarthy@intel.com" , jerin.jacob@caviumnetworks.com, dev@dpdk.org, ferruh.yigit@intel.com To: Thomas Monjalon Return-path: Received: from mail-pf0-f193.google.com (mail-pf0-f193.google.com [209.85.192.193]) by dpdk.org (Postfix) with ESMTP id 51AC2A48F for ; Sun, 21 Jan 2018 18:35:01 +0100 (CET) Received: by mail-pf0-f193.google.com with SMTP id 23so5261370pfp.3 for ; Sun, 21 Jan 2018 09:35:01 -0800 (PST) In-Reply-To: <20236883.VkVyGBRfOF@xps> 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 Sat, 20 Jan 2018 09:44:46 +0100 Thomas Monjalon wrote: > 20/01/2018 06:18, Patil, Harish: > > Hi, > >=20 > > I am seeing below compilation errors in drivers/event/opdl/, this is wi= th > > cloned latest DPDK (git clone http://dpdk.org/git/dpdk). > >=20 > > .. > > .. > > /home2/hpatil/e4/jan19-inbox-submit/dpdk/drivers/event/opdl/opdl_evdev_= xsta > > ts.c: In function =C3=A2=E2=82=AC=CB=9Copdl_xstats_get_names=C3=A2=E2= =82=AC=E2=84=A2: > > /home2/hpatil/e4/jan19-inbox-submit/dpdk/drivers/event/opdl/opdl_evdev_= xsta > > ts.c:89:2: error: =C3=A2=E2=82=AC=CB=9Cfor=C3=A2=E2=82=AC=E2=84=A2 loop= initial declarations are only allowed in > > C99 mode > > for (uint32_t j =3D 0; j < max_num_port_xstat; j++) { > > ^ =20 >=20 > My compiler does not raise this error. > What is your compiler? >=20 > Anyone to fix it QUICKLY please? today? >=20 > Harish, do you think we should revert if not fixed? Using declaration in for loop is a C++ thing which was inherited into C99. Does DPDK require C99 mode? Putting loop variables in for() looks better, but the rest of DPDK doesn't use that style.