From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id D27FEA0527; Mon, 9 Nov 2020 17:45:09 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 95F8E6947; Mon, 9 Nov 2020 17:45:07 +0100 (CET) Received: from EUR03-VE1-obe.outbound.protection.outlook.com (mail-eopbgr50046.outbound.protection.outlook.com [40.107.5.46]) by dpdk.org (Postfix) with ESMTP id 515605F13 for ; Mon, 9 Nov 2020 17:45:05 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ug7CDjTpZuDmA0VcS5g/cMrsJ6NCCq7s9f1TjMp9o9M=; b=mpGkA00/Huj4mfE6Jd2p98TcYz4Zu53EBZTO5FiHs0AVLr2uCHRrNc6jodanVKr1FKA4ay3/0d1MHKflTqkJiIWk6+Vot0XaWJah5xll1EyfknblCo4Sje0Buey0xiIDtu2dcGiRsSLpyVzDZtII0dAF5ckx2bm+aQJpUtwBovg= Received: from AM7PR04CA0025.eurprd04.prod.outlook.com (2603:10a6:20b:110::35) by DB6PR0802MB2262.eurprd08.prod.outlook.com (2603:10a6:4:84::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3499.28; Mon, 9 Nov 2020 16:45:00 +0000 Received: from AM5EUR03FT019.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:110:cafe::9b) by AM7PR04CA0025.outlook.office365.com (2603:10a6:20b:110::35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3541.21 via Frontend Transport; Mon, 9 Nov 2020 16:45:00 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dpdk.org; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dpdk.org; dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM5EUR03FT019.mail.protection.outlook.com (10.152.16.104) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3541.17 via Frontend Transport; Mon, 9 Nov 2020 16:45:00 +0000 Received: ("Tessian outbound fcd5bc555ddc:v71"); Mon, 09 Nov 2020 16:45:00 +0000 X-CR-MTA-TID: 64aa7808 Received: from a7a13a60c511.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id AE7A540F-80FF-45CA-BB2D-7CE0F6AF562E.1; Mon, 09 Nov 2020 16:44:54 +0000 Received: from EUR04-DB3-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id a7a13a60c511.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Mon, 09 Nov 2020 16:44:54 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OqxAH0CFAK1LApXfWo8dTeYzDhk1v4LRrhOa3qaNudka1d1VnqnsDj9AZFGv6purvBbdYBZx3dlH5z5TbeEDxoVqv1AR4uvkk6x49rmfF54ANn7SQ0YCx8mtR49eSLRcZ10h5yFral1J4F7tsI0wQjl0YwbWXsN3GqPOw2jrkr0K3eAS6r+iVxxNVdtSMdKlaFgo9J4Rd0Q+0v9pcrC7rQF5PvEbwpu3i9wmsdqCupgDO5zFzYeqir8a9qbCs07HvmvlRwWQ6wpSxFS63bOBx0tv3FsJuYfEBxTy6ZNpumxlJEhjuUDkHWKYl+qfw0gMmyMWufo9IXDGShJIlkm54Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ug7CDjTpZuDmA0VcS5g/cMrsJ6NCCq7s9f1TjMp9o9M=; b=gkn3ptly1/awmc5KRu4WSKM2kk5SQtSSkCWbaRXm4VIq8+eLgz6Vk61ocvCy35be7HO65GW8WAZUawxTJezgOoFaA5PwU0N2Kpoi795gbD6OSF8vw4+bof/9hhEhsoSR071F/fgSJtMDOcprLLD0htVPByFfh2p0xGilSmow2ymWgLDtaMCUMt76W/Zq+bgfeLOU3JQzo9AjgyBgdZ2ZaP92xRP2DUWfT90YcwQEWR3UMizEcLfPDT86UdNcFo8T6VdNLpmpV/WY9tGGmhAMSdo5QD093SlDprBhg8nd/F4ZW5u6vVgwshuMA94fmqUyp2SeAdchbXQLxEGGEITxcw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ug7CDjTpZuDmA0VcS5g/cMrsJ6NCCq7s9f1TjMp9o9M=; b=mpGkA00/Huj4mfE6Jd2p98TcYz4Zu53EBZTO5FiHs0AVLr2uCHRrNc6jodanVKr1FKA4ay3/0d1MHKflTqkJiIWk6+Vot0XaWJah5xll1EyfknblCo4Sje0Buey0xiIDtu2dcGiRsSLpyVzDZtII0dAF5ckx2bm+aQJpUtwBovg= Received: from DBAPR08MB5814.eurprd08.prod.outlook.com (2603:10a6:10:1b1::6) by DB8PR08MB5242.eurprd08.prod.outlook.com (2603:10a6:10:e8::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3541.24; Mon, 9 Nov 2020 16:44:53 +0000 Received: from DBAPR08MB5814.eurprd08.prod.outlook.com ([fe80::7814:9c1:781f:475d]) by DBAPR08MB5814.eurprd08.prod.outlook.com ([fe80::7814:9c1:781f:475d%4]) with mapi id 15.20.3541.025; Mon, 9 Nov 2020 16:44:53 +0000 From: Honnappa Nagarahalli To: "Walsh, Conor" , "Ananyev, Konstantin" CC: "dev@dpdk.org" , "Chen, LingliX" , nd , Honnappa Nagarahalli , nd Thread-Topic: [PATCH v1] app/test: zcd needs to be initialised to fix gcc compile error Thread-Index: AQHWsszTRxk6cC6E8kGHmDv39SBl8am4TxpAgAezxQCAAAUUMA== Date: Mon, 9 Nov 2020 16:44:53 +0000 Message-ID: References: <20201104170306.1688771-1-conor.walsh@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ts-tracking-id: 0448D3A2DE22A14B846BE05CB7F659B2.0 x-checkrecipientchecked: true Authentication-Results-Original: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=arm.com; x-originating-ip: [107.77.222.108] x-ms-publictraffictype: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 33a1511f-be18-47db-a87b-08d884cecc94 x-ms-traffictypediagnostic: DB8PR08MB5242:|DB6PR0802MB2262: x-ms-exchange-transport-forked: True X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true nodisclaimer: true x-ms-oob-tlc-oobclassifiers: OLM:8273;OLM:8273; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: vk6ZwU9k96rZ8L2l0HlxO1NOZwwh8xd2oxWR65pxYNTezV7GcqlSJPnxPhUUVFxWkL0xJN8e1AmGwehDiCsCII55l9VoGHfrbgkqNe+Kom6PTwBmE6pnQYnxcw/EMJv9uUxmkYPxQLz8ZboPNc1GDEmirEGQJyZbaGEY7sdRWXL/11w36cXhutGGNTKd5z4gez7x0Q/zpDI4ejF4zc4hPXnhm+xTPCafXmolCgP+HNsEFG74Muq3UGCBZ2AWf4hv4C8B36uxYFBw0X2KpJ1ruTcmr2WJs9yZGEvTycTrJJ6arbfIRgDb5rCjnYBgRQRD9Z05s1Vea4ZxhWBoLDL+SQ== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DBAPR08MB5814.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(39860400002)(396003)(136003)(346002)(376002)(366004)(66946007)(33656002)(76116006)(5660300002)(66556008)(8676002)(26005)(53546011)(6506007)(52536014)(55016002)(66476007)(9686003)(66446008)(2906002)(478600001)(186003)(83380400001)(4326008)(8936002)(71200400001)(86362001)(54906003)(316002)(7696005)(64756008)(110136005); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: 0rN2Jv/405Pi3ol5OX6uUNJQ6+8nKBFGj66ushvqFwvoHPK7vGf+5BomalcdzIqYdFAReViMhij25sM2ENDZUPhxtbeUyJHGIEB/Vl8D33rkA6LoDRnMzRvmnh1s7ydNft+ZIZtm+AzZggW4Heavvfjbpy1IrpE7j9N3ToQVL1vO9lSEXhaYHuRrKVjdj7sVHQoDFoVJNFDDJDu1hq5md9GPvZlA/5HSdEP59rtf0vQuN9VjYDvmfpb1/gwpaxQ8ZuKRRu/1BvcmVebhrylJeZYsxjBKpCDQdW60w8ba+zV7uSenHN1ZqpGARRlHEnUn8dRW+F7LpnUZf4tEN8rWJPSFfZi+ZUBsPznBjaC7g9+JZcgcq89yltjodPW27/i1aHmk3Og1aWs1U5hHIizBFyveten9iuR8MChCOI8+MIoctZ6GO1MexhvcrWqiLfqAOaUPxc2+o57TxKY6RrGF8PJKhJ/+K8+YaFR/fxiKq41fkikASf2cO1wqi1cAOj5M7QoLhb8l45ZAEO3QaG29Yusv0DSj2JjWQ93UeAzVEVJCPP9x5bHIm+KyvO7Xr5VEB9ji4OE80loLxEnnRulvd0RB9hB3aLlbsl97y17fSMEwKV9zu9RO70K1NHxy5DgFVJh1OxwQageY8ZOI9LUBgQ== Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR08MB5242 Original-Authentication-Results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM5EUR03FT019.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: ce657d2e-7305-4b2e-6cdd-08d884cec897 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: v5AZuu3SGJLT+DkBh0No2X6kQ2KlUMGKoOAdPbdAIz828z52u0rO6CXm2GV9wCKouBn6TZRlseqYQd0mYCVBrPj0PboRlCuTVwjjY/ikG9AN1llvBLB7GIvcdGmEfesbWiGa34HP5jLrZYwxRiithh/jtCqCkjf2nWJnyfb0jLGwiNgpsJGUCoZv91TFI6t5VhEvJn7Ez8ROEz+6lpusZTqTcCfbzaM7dzjvyfKMQbR+5zPyqri3u9m/i8GCBCG6J64vfEIumBpHiG1pRcn/Yq3ZBYQ5hscUobXdvs6WrvDDM8U+TScs16eDzzisneM9+f00/Iwzt/XeD3NOthy54ZbpEZHZJTR0W4GC0ZSthyQxc+fuvOsHkX7iqmU2OGGo/5E62akVCOx8Ni3kNByQWA== X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFS:(4636009)(346002)(396003)(376002)(136003)(39860400002)(46966005)(478600001)(186003)(9686003)(7696005)(33656002)(336012)(2906002)(5660300002)(82310400003)(8936002)(86362001)(8676002)(70206006)(55016002)(82740400003)(4326008)(81166007)(36906005)(53546011)(70586007)(47076004)(52536014)(6506007)(356005)(54906003)(110136005)(26005)(83380400001)(316002); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Nov 2020 16:45:00.2559 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 33a1511f-be18-47db-a87b-08d884cecc94 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: AM5EUR03FT019.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0802MB2262 Subject: Re: [dpdk-dev] [PATCH v1] app/test: zcd needs to be initialised to fix gcc compile error 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" >=20 > Hi Honnappa, >=20 > Sorry about the delayed reply. No problem, thank you. > The build error trace is below, the build command used was: CC=3Dgcc meso= n -- > optimization=3D1 --werror build1; ninja -C build1 I am not sure how I cou= ld fix > this issue without initialising zcd. >=20 > [2339/2407] Compiling C object app/test/dpdk- > test.p/test_ring_mt_peek_stress_zc.c.o > FAILED: app/test/dpdk-test.p/test_ring_mt_peek_stress_zc.c.o > gcc -Iapp/test/dpdk-test.p -Iapp/test -I../app/test -Ilib/librte_acl - > I../lib/librte_acl -I. -I.. -Iconfig -I../config -Ilib/librte_eal/include= - > I../lib/librte_eal/include -Ilib/librte_eal/linux/include - > I../lib/librte_eal/linux/include -Ilib/librte_eal/x86/include - > I../lib/librte_eal/x86/include -Ilib/librte_eal/common - > I../lib/librte_eal/common -Ilib/librte_eal -I../lib/librte_eal -Ilib/libr= te_kvargs - > I../lib/librte_kvargs -Ilib/librte_metrics -I../lib/librte_metrics - > Ilib/librte_telemetry -I../lib/librte_telemetry -Idrivers/bus/pci - > I../drivers/bus/pci -I../drivers/bus/pci/linux -Ilib/librte_pci -I../lib/= librte_pci - > Idrivers/bus/vdev -I../drivers/bus/vdev -Ilib/librte_bitratestats - > I../lib/librte_bitratestats -Ilib/librte_ethdev -I../lib/librte_ethdev - > Ilib/librte_net -I../lib/librte_net -Ilib/librte_mbuf -I../lib/librte_mbu= f - > Ilib/librte_mempool -I../lib/librte_mempool -Ilib/librte_ring -I../lib/li= brte_ring > -Ilib/librte_meter -I../lib/librte_meter -Ilib/librte_bpf -I../lib/librte= _bpf - > Ilib/librte_cfgfile -I../lib/librte_cfgfile -Ilib/librte_cmdline -I../lib= /librte_cmdline > -Ilib/librte_cryptodev -I../lib/librte_cryptodev -Ilib/librte_distributor= - > I../lib/librte_distributor -Ilib/librte_efd -I../lib/librte_efd -Ilib/lib= rte_hash - > I../lib/librte_hash -Ilib/librte_rcu -I../lib/librte_rcu -Ilib/librte_eve= ntdev - > I../lib/librte_eventdev -Ilib/librte_timer -I../lib/librte_timer -Ilib/li= brte_fib - > I../lib/librte_fib -Ilib/librte_rib -I../lib/librte_rib -Ilib/librte_flow= _classify - > I../lib/librte_flow_classify -Ilib/librte_table -I../lib/librte_table -Il= ib/librte_port > -I../lib/librte_port -Ilib/librte_sched -I../lib/librte_sched -Ilib/librt= e_ip_frag - > I../lib/librte_ip_frag -Ilib/librte_kni -I../lib/librte_kni -Ilib/librte_= lpm - > I../lib/librte_lpm -Ilib/librte_graph -I../lib/librte_graph -Ilib/librte_= ipsec - > I../lib/librte_ipsec -Ilib/librte_security -I../lib/librte_security - > Ilib/librte_latencystats -I../lib/librte_latencystats -Ilib/librte_member= - > I../lib/librte_member -Ilib/librte_node -I../lib/librte_node -Ilib/librte= _pipeline > -I../lib/librte_pipeline -Ilib/librte_rawdev -I../lib/librte_rawdev - > Ilib/librte_reorder -I../lib/librte_reorder -Ilib/librte_stack -I../lib/l= ibrte_stack - > Idrivers/mempool/ring -I../drivers/mempool/ring -Idrivers/mempool/stack - > I../drivers/mempool/stack -Idrivers/event/skeleton - > I../drivers/event/skeleton -Idrivers/net/bonding -I../drivers/net/bonding= - > Idrivers/net/ring -I../drivers/net/ring -Ilib/librte_power -I../lib/librt= e_power - > Ilib/librte_pdump -I../lib/librte_pdump -Idrivers/crypto/scheduler - > I../drivers/crypto/scheduler -fdiagnostics-color=3Dalways -pipe - > D_FILE_OFFSET_BITS=3D64 -Wall -Winvalid-pch -Werror -O1 -include > rte_config.h -Wextra -Wcast-qual -Wdeprecated -Wformat-nonliteral - > Wformat-security -Wmissing-declarations -Wmissing-prototypes -Wnested- > externs -Wold-style-definition -Wpointer-arith -Wsign-compare -Wstrict- > prototypes -Wundef -Wwrite-strings -Wno-packed-not-aligned -Wno-missing- > field-initializers -march=3Dnative -mno-avx512f -DALLOW_EXPERIMENTAL_API = - > Wno-format-truncation -D_GNU_SOURCE -fno-strict-aliasing - > DALLOW_INTERNAL_API -MD -MQ app/test/dpdk- > test.p/test_ring_mt_peek_stress_zc.c.o -MF app/test/dpdk- > test.p/test_ring_mt_peek_stress_zc.c.o.d -o app/test/dpdk- > test.p/test_ring_mt_peek_stress_zc.c.o -c > ../app/test/test_ring_mt_peek_stress_zc.c > In file included from ../app/test/test_ring_mt_peek_stress_zc.c:5: > ../app/test/test_ring_stress_impl.h: In function 'test_worker': > ../app/test/test_ring.h:82:3: error: 'zcd.n1' may be used uninitialized i= n this > function [-Werror=3Dmaybe-uninitialized] > test_ring_mem_copy(zcd->ptr2, src, > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > esize, num - zcd->n1); > ~~~~~~~~~~~~~~~~~~~~~ > ../app/test/test_ring_mt_peek_stress_zc.c:32:26: note: 'zcd.n1' was decla= red > here > struct rte_ring_zc_data zcd; > ^~~ > In file included from ../app/test/test_ring_mt_peek_stress_zc.c:5: > ../app/test/test_ring.h:67:2: error: '*((void *)&zcd+8)' may be used > uninitialized in this function [-Werror=3Dmaybe-uninitialized] > memcpy(dst, src, sz); > ^~~~~~~~~~~~~~~~~~~~ > ../app/test/test_ring_mt_peek_stress_zc.c:32:26: note: '*((void *)&zcd+8)= ' > was declared here I remember seeing a similar error in test_ring_st_peek_stress_zc.c. In the file test_ring_mt_peek_stress_zc.c, after the call to enqueue/dequeu= e API calls, we have: "n =3D (m =3D=3D n) ? n : 0;" This is present as the code was copied from existing code. I do not see why= this line is required. Can you please try to remove this line and see if i= t works? > struct rte_ring_zc_data zcd; > ^~~ > In file included from ../app/test/test_ring_mt_peek_stress_zc.c:5: > ../app/test/test_ring.h:67:2: error: 'zcd' may be used uninitialized in t= his > function [-Werror=3Dmaybe-uninitialized] > memcpy(dst, src, sz); > ^~~~~~~~~~~~~~~~~~~~ > ../app/test/test_ring_mt_peek_stress_zc.c:32:26: note: 'zcd' was declared > here > struct rte_ring_zc_data zcd; > ^~~ > In file included from ../app/test/test_ring_mt_peek_stress_zc.c:5: > ../app/test/test_ring.h:63:11: error: 'zcd.n1' may be used uninitialized = in this > function [-Werror=3Dmaybe-uninitialized] > sz =3D num * sizeof(void *); > ~~~~^~~~~~~~~~~~~~~~ > ../app/test/test_ring_mt_peek_stress_zc.c:14:26: note: 'zcd.n1' was decla= red > here > struct rte_ring_zc_data zcd; > ^~~ > In file included from ../app/test/test_ring_mt_peek_stress_zc.c:5: > ../app/test/test_ring.h:67:2: error: '*((void *)&zcd+8)' may be used > uninitialized in this function [-Werror=3Dmaybe-uninitialized] > memcpy(dst, src, sz); > ^~~~~~~~~~~~~~~~~~~~ > ../app/test/test_ring_mt_peek_stress_zc.c:14:26: note: '*((void *)&zcd+8)= ' > was declared here > struct rte_ring_zc_data zcd; > ^~~ > In file included from ../app/test/test_ring_mt_peek_stress_zc.c:5: > ../app/test/test_ring.h:67:2: error: 'zcd' may be used uninitialized in t= his > function [-Werror=3Dmaybe-uninitialized] > memcpy(dst, src, sz); > ^~~~~~~~~~~~~~~~~~~~ > ../app/test/test_ring_mt_peek_stress_zc.c:14:26: note: 'zcd' was declared > here > struct rte_ring_zc_data zcd; > ^~~ > cc1: all warnings being treated as errors [2340/2407] Compiling C object > drivers/libtmp_...ontx2.a.p/event_octeontx2_otx2_worker_dual.c.o > ninja: build stopped: subcommand failed. >=20 > Thanks, > Conor. >=20 > > From: Honnappa Nagarahalli > > Sent: Wednesday 4 November 2020 18:48 > > To: Walsh, Conor ; Ananyev, Konstantin > > > > Cc: dev@dpdk.org; Chen, LingliX ; nd > > ; Honnappa Nagarahalli ; > nd > > > > Subject: RE: [PATCH v1] app/test: zcd needs to be initialised to fix > > gcc compile error > > > > Hi Conor, > > Thanks for the patch. > > > > > > > > > > > > When DPDK is compiled with gcc < 9 with the optimization level set > > > to 1 gcc sees zcd in test_ring.h as possibly being uninitialised. To > > > correct this error > > zcd > > > has been initialised to {0} in test_ring_mt_peek_stress_zc.c. > > > > > > Signed-off-by: Conor Walsh > > > --- > > > app/test/test_ring_mt_peek_stress_zc.c | 4 ++-- > > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > > > diff --git a/app/test/test_ring_mt_peek_stress_zc.c > > > b/app/test/test_ring_mt_peek_stress_zc.c > > > index 7e0bd511a7..ba0acf237c 100644 > > > --- a/app/test/test_ring_mt_peek_stress_zc.c > > > +++ b/app/test/test_ring_mt_peek_stress_zc.c > > > @@ -11,7 +11,7 @@ _st_ring_dequeue_bulk(struct rte_ring *r, void > > > **obj, uint32_t n, > > > uint32_t *avail) > > > { > > > uint32_t m; > > > - struct rte_ring_zc_data zcd; > > > + struct rte_ring_zc_data zcd =3D {0}; > > I faced similar problems when I created this test case. I refrained > > from doing this initialization as it might mask the problems in the > > library. Is it possible to identify which path in the library is > > actually resulting in this error? I would prefer to fix that instead. > > > > > > > > m =3D rte_ring_dequeue_zc_bulk_start(r, n, &zcd, avail); > > > n =3D (m =3D=3D n) ? n : 0; > > > @@ -29,7 +29,7 @@ _st_ring_enqueue_bulk(struct rte_ring *r, void * > > const > > > *obj, uint32_t n, > > > uint32_t *free) > > > { > > > uint32_t m; > > > - struct rte_ring_zc_data zcd; > > > + struct rte_ring_zc_data zcd =3D {0}; > > > > > > m =3D rte_ring_enqueue_zc_bulk_start(r, n, &zcd, free); > > > n =3D (m =3D=3D n) ? n : 0; > > > -- > > > 2.25.1