From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by dpdk.org (Postfix) with ESMTP id E703DA56E for ; Sun, 21 Jan 2018 18:49:53 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 394D720A6F; Sun, 21 Jan 2018 12:49:53 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute1.internal (MEProxy); Sun, 21 Jan 2018 12:49:53 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=mesmtp; bh=gohwqt99WTXYA81nc9egamU2YI B5shrLR8Ek0t5xh+M=; b=NE13THr/6aolnFH19rNiSDKbGHA3EUqQldjZ4dzZZY 4yKzksB1ZmBCamErvbicNQ2e228bxrrkecvR7C8Y5il8iqmAbMvmzSiYTujgNTXB 2KRAjGG9MjyaiOPBOudA9wiJDsf0+ANU0jWCdinnL9OyS4Sni0QKDbwgB+aEAkzR 0= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=gohwqt 99WTXYA81nc9egamU2YIB5shrLR8Ek0t5xh+M=; b=OnaDGQHgKvCYb+2yrCaIak Ohs2PCnh1QdkTvHcrrfip8/fUwPHUay15GKM9snGekWG8k0ubqFwJDpsJ1bY+x8+ WP3HeO+tgQ3K1I9d7FUp8/tkufvydddy0Zd1KN6Xk8FJp6XlqibFGOOkSZrualT9 RupIe2Dx/5dvH31ckjCHmrohegSkvfU9aBHRMfz8TmM/Qi2c1V/GmjHyW4sDTl7a c1qgKCr141G62EsxaCSWK9AJ2D4t165yCepZ7ePrF6d2x8MmgE4piJ9x7dCZh49F OKV2lwNjvPjAhkhNkeyDB0TcK+bFdZperjZoyHI08JMRtiIxyY0RYZFH0DIT6nYg == X-ME-Sender: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id DB6CD24547; Sun, 21 Jan 2018 12:49:52 -0500 (EST) From: Thomas Monjalon To: Stephen Hemminger Cc: "Patil, Harish" , "liang.j.ma@intel.com" , "peter.mccarthy@intel.com" , jerin.jacob@caviumnetworks.com, dev@dpdk.org, ferruh.yigit@intel.com, adrien.mazarguil@6wind.com Date: Sun, 21 Jan 2018 18:49:13 +0100 Message-ID: <5211400.X7DXXCoju3@xps> In-Reply-To: <20180121093458.082f4589@xeon-e3> References: <20236883.VkVyGBRfOF@xps> <20180121093458.082f4589@xeon-e3> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] Compilation errors in drivers/event/opdl/ X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Jan 2018 17:49:54 -0000 21/01/2018 18:34, Stephen Hemminger: > On Sat, 20 Jan 2018 09:44:46 +0100 > Thomas Monjalon wrote: >=20 > > 20/01/2018 06:18, Patil, Harish: > > > Hi, > > >=20 > > > I am seeing below compilation errors in drivers/event/opdl/, this is = with > > > cloned latest DPDK (git clone http://dpdk.org/git/dpdk). > > >=20 > > > .. > > > .. > > > /home2/hpatil/e4/jan19-inbox-submit/dpdk/drivers/event/opdl/opdl_evde= v_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_evde= v_xsta > > > ts.c:89:2: error: =C3=A2=E2=82=AC=CB=9Cfor=C3=A2=E2=82=AC=E2=84=A2 lo= op 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? >=20 > Using declaration in for loop is a C++ thing which was inherited into C99. > Does DPDK require C99 mode? No DPDK is not generally C99. > Putting loop variables in for() looks better, but the rest of DPDK > doesn't use that style. C99 was forced for this driver as a quick fix. Either the coding style guideline is updated to C99, or this driver must be adapted to the DPDK coding style. I have no strong opinion. Is C99 well supported in all compilers we want to use (including Windows)?