From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 35EC14285A; Tue, 28 Mar 2023 18:25:22 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 16C1A40EDF; Tue, 28 Mar 2023 18:25:22 +0200 (CEST) Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by mails.dpdk.org (Postfix) with ESMTP id D29CE4021D; Tue, 28 Mar 2023 18:25:20 +0200 (CEST) Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 2C8475C005C; Tue, 28 Mar 2023 12:25:20 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Tue, 28 Mar 2023 12:25:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm2; t= 1680020720; x=1680107120; bh=CChvdehkyzVDY4fyUyUu+IzrG0QRG1ARhkY iw90U+qE=; b=dZqqVS0AWhmxLyEsVdPdHSCEf+eJTUWilYbjZSqYDILkHqb2n5J ZkPHHi8G6/sAiQW2QDuNaBlk7WnvaoHqRHrzN/1aiIJA7yVXFZJMY/B9WfbIYkWN QVDxqKv4oA47doAzQ/tI0YPNcKzU2mMRFWTQHRJN/473zH9URouUagvBPTEJwqxw 6UWni5RHPubI8BoNHwDeGWCn52fcySWG0Y3YB+dWfe43nsqeOEpvePIN1aEnoViW UER36v9bNV2ID2nAnQl3u8u6GisI9D1+kUpgvotHfVnOsexKWAfrG2AJLOBzPIq+ KKx8Emji8Snzt0I/uvv5+7Du6dLBa5L6mSw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t= 1680020720; x=1680107120; bh=CChvdehkyzVDY4fyUyUu+IzrG0QRG1ARhkY iw90U+qE=; b=TkoHBACr6FpGGz/hXJC5Tpa8mLzlkNw8eA/WDRXCC/zPBPP8vYV WJLr70ysGEzx15JACe9EQGz00mEDxr0nv6yyZ/1fotDvuffyEj7XxLQO/XoNnIrQ zSE8PSqSDGm5i5FkwkFCY84BXLHDkUsXJjlouAOP28RT3rmtRcVbbJv3Mc/zoGgM hgK/mFfluRFEKtbKGoNZ07n1G5+shM9+WD4W3yZVr73M1ZrXC9cP1dZhWsBVsU7C Vi2c/molVzkXjXk57fb3y1BMh0o+0Mk/XcQNU8qPtgEGzr5jB0IAWMPcXx7HhUk/ Q4SkfDpSAvYD8XB3CHiwdWZjVqYP8Sdd0JQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdehgedgleelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkjghfggfgtgesthhqredttddtjeenucfhrhhomhepvfhhohhm rghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenuc ggtffrrghtthgvrhhnpeegtddtleejjeegffekkeektdejvedtheevtdekiedvueeuvdei uddvleevjeeujeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh hrohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 28 Mar 2023 12:25:18 -0400 (EDT) From: Thomas Monjalon To: Joyce Kong Cc: reshma.pattan@intel.com, stephen@networkplumber.org, konstantin.v.ananyev@yandex.ru, dev@dpdk.org, nd@arm.com, stable@dpdk.org, Ruifeng Wang Subject: Re: [PATCH] pdump: fix build issue with GCC 12 Date: Tue, 28 Mar 2023 18:25:16 +0200 Message-ID: <1811939.QZUTf85G27@thomas> In-Reply-To: <20230327070712.280265-1-joyce.kong@arm.com> References: <20230327070712.280265-1-joyce.kong@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org 27/03/2023 09:07, Joyce Kong: > The following warning is observed with GCC12 compilation > with release 20.11: >=20 > In function =E2=80=98__rte_ring_enqueue_elems_64=E2=80=99, > inlined from =E2=80=98__rte_ring_enqueue_elems=E2=80=99 at > ../lib/librte_ring/rte_ring_elem.h:225:3, > inlined from =E2=80=98__rte_ring_do_enqueue_elem=E2=80=99 at > ../lib/librte_ring/rte_ring_elem.h:424:2, > inlined from =E2=80=98rte_ring_mp_enqueue_burst_elem=E2=80=99 at > ../lib/librte_ring/rte_ring_elem.h:884:9, > inlined from =E2=80=98rte_ring_enqueue_burst_elem=E2=80=99 at > ../lib/librte_ring/rte_ring_elem.h:946:10, > inlined from =E2=80=98rte_ring_enqueue_burst=E2=80=99 at > ../lib/librte_ring/rte_ring.h:721:9, > inlined from =E2=80=98pdump_copy=E2=80=99 at > ../lib/librte_pdump/rte_pdump.c:94:13: > ../lib/librte_ring/rte_ring_elem.h:162:40: warning: =E2=80=98*dup_bufs.36= _42 > + _89=E2=80=99 may be used uninitialized [-Wmaybe-uninitialized] > 162 | ring[idx] =3D obj[i]; > | ~~~^~~ > ../lib/librte_ring/rte_ring_elem.h:163:44: warning: =E2=80=98*dup_bufs.36= _42 > + _98=E2=80=99 may be used uninitialized [-Wmaybe-uninitialized] > 163 | ring[idx + 1] =3D obj[i + 1]; > | ~~~^~~~~~~ > ../lib/librte_ring/rte_ring_elem.h:164:44: warning: =E2=80=98*dup_bufs.36= _42 > + _107=E2=80=99 may be used uninitialized [-Wmaybe-uninitialized] > 164 | ring[idx + 2] =3D obj[i + 2]; > | ~~~^~~~~~~ > ../lib/librte_ring/rte_ring_elem.h:165:44: warning: =E2=80=98*dup_bufs.36= _42 > + _116=E2=80=99 may be used uninitialized [-Wmaybe-uninitialized] > 165 | ring[idx + 3] =3D obj[i + 3]; > | ~~~^~~~~~~ > ../lib/librte_ring/rte_ring_elem.h:169:42: warning: =E2=80=98*dup_bufs.36= _42 > + _129=E2=80=99 may be used uninitialized [-Wmaybe-uninitialized] > 169 | ring[idx++] =3D obj[i++]; /* fallthrough = */ > | ~~~^~~~~ > ../lib/librte_ring/rte_ring_elem.h:171:42: warning: =E2=80=98*dup_bufs.36= _42 > + _139=E2=80=99 may be used uninitialized [-Wmaybe-uninitialized] > 171 | ring[idx++] =3D obj[i++]; /* fallthrough = */ > | ~~~^~~~~ > ../lib/librte_ring/rte_ring_elem.h:173:42: warning: =E2=80=98*dup_bufs.36= _42 > + _149=E2=80=99 may be used uninitialized [-Wmaybe-uninitialized] > 173 | ring[idx++] =3D obj[i++]; >=20 > Actually, this is an alias warning as -O3 enables strict alias. > This patch fixes it by replacing 'dup_bufs' with '&dup_bufs[0]' > as the compiler represents them differently. >=20 > Fixes: 278f945402c5 ("pdump: add new library for packet capture") > Cc: stable@dpdk.org >=20 > Signed-off-by: Joyce Kong > Reviewed-by: Ruifeng Wang Acked-by: Reshma Pattan Acked-by: Tyler Retzlaff Applied, thanks.