From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id C5D5F7803E6 for ; Mon, 21 Aug 2023 14:35:43 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=W9Soldd1juYIcan6LETJewYbPjzO9Ok2v7yMzCUKLJo=; c=relaxed/simple; d=groups.io; h=ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results:From:To:CC:Subject:Thread-Topic:Thread-Index:Date:Message-ID:References:In-Reply-To:Accept-Language:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20140610; t=1692628542; v=1; b=qBv0FNwgRoaEJc2+/cipGYOImCjPCRHqL4b9Nf3yyzVPDJCWWdo68iOAG8tTBljL4ACj8kV8 z7aHKGP4EbbifuBz9lASI1EnmL0c7r90HV4nzFAUWw5VdlDyWSWSDGVf75i3laHl6p5grJc5o4v quHhEo9cZuobiZ1DlCnKwwbk= X-Received: by 127.0.0.2 with SMTP id 8GVxYY7687511x9y2jk3dRDX; Mon, 21 Aug 2023 07:35:42 -0700 X-Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.120]) by mx.groups.io with SMTP id smtpd.web10.934.1692628542006259063 for ; Mon, 21 Aug 2023 07:35:42 -0700 X-IronPort-AV: E=McAfee;i="6600,9927,10809"; a="372505839" X-IronPort-AV: E=Sophos;i="6.01,190,1684825200"; d="scan'208";a="372505839" X-Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Aug 2023 07:32:52 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10809"; a="859486204" X-IronPort-AV: E=Sophos;i="6.01,190,1684825200"; d="scan'208";a="859486204" X-Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by orsmga004.jf.intel.com with ESMTP; 21 Aug 2023 07:32:51 -0700 X-Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Mon, 21 Aug 2023 07:32:51 -0700 X-Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27 via Frontend Transport; Mon, 21 Aug 2023 07:32:51 -0700 X-Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.48) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.27; Mon, 21 Aug 2023 07:32:51 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YSodBs3bEx9XlAAYDEBU96R4MMc0ApR0/nzUnJeoYybRhuEXTjH/3XScBEv5jAAHoGHRQIo9Kjm05N111iLVOd7PkfSoT3ybaTV+gm+NdgQtQTLK/eP5WzmNJQudHGnq5wQFuxXPzW7RlolYfcpz2eEyMK/ebaKYMlT7H1K4GOXvJ6GYQRKW2jWQ53g6oBGfQAvgKVIDYwvjz9WzmkwTQgpSoEm2JjoDiBQvgAyG34oXi0xHWx06VYfQ3ydSTNF+raDfl/+kSaMEeTcu5w8P1/Hq3F4/U8P7Ft202bt/3GXeztEGrLnHbdQ1h4DxnlB77aNOBBVSA2TMxaUgadeMrg== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=PLqOKJBeuYrMGvJ4vXWxS2yZn8xEqZgk30Ph2UB31dY=; b=NYQGQ+jkt8MxjK/rxTHkL0p9UmaYUpoRAjNjE0/B1erZU/IqJ+eNu2zT9vnPrFRJPv42fcNTIODhx7Z85oRm1DdUBSr6HKePtpsULzYGwkbLFNjchY9GMJSbe5Qyt8tQroWU3h2dCBxLTueFZJcFhvww2yxwaxIXCN25OOrv5eORqb0TGpemb4TM+3QxemN18E09sMMH8xjCsb1NlYDWdBqEot6aki2GXWnvaQ9XR4xD3gExsTH9jRJYsNdDqQ1YiSBs3m3B0buLOcnt9wIRCBbxJuj7iT7IuiEhwVxcVRJ4nLk84u6EVMwr3lxeEsdC56mY1FfHLBrMnYIXAmBCGQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none X-Received: from MW4PR11MB5872.namprd11.prod.outlook.com (2603:10b6:303:169::14) by SA2PR11MB4876.namprd11.prod.outlook.com (2603:10b6:806:119::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6699.24; Mon, 21 Aug 2023 14:32:48 +0000 X-Received: from MW4PR11MB5872.namprd11.prod.outlook.com ([fe80::fdf8:dc0e:db69:f35b]) by MW4PR11MB5872.namprd11.prod.outlook.com ([fe80::fdf8:dc0e:db69:f35b%4]) with mapi id 15.20.6699.022; Mon, 21 Aug 2023 14:32:48 +0000 From: "Yao, Jiewen" To: "devel@edk2.groups.io" , "ehaouas@noos.fr" CC: "Yao, Jiewen" Subject: Re: [edk2-devel] [PATCH] Use C99 flexible arrays Thread-Topic: [edk2-devel] [PATCH] Use C99 flexible arrays Thread-Index: AQHZ07WMIbDDx6hAXkeV4ckc1TKiEK/00Rrw Date: Mon, 21 Aug 2023 14:32:48 +0000 Message-ID: References: <20230820110704.18359-1-ehaouas@noos.fr> In-Reply-To: <20230820110704.18359-1-ehaouas@noos.fr> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: MW4PR11MB5872:EE_|SA2PR11MB4876:EE_ x-ms-office365-filtering-correlation-id: 002f2829-f6bf-4a9e-693e-08dba2537e13 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam-message-info: /b+t3Bj9apWeohFwxiI6OpqUaP0/BeGTCi6ipQ0y9E2yDiHdq10zy+Mv1u9C7cAyfMDP9HWTNMjikjusyWJZ3JZ9JTOtIJA/dK/Nm3qZMS9pA2vM7rhGPK//LgTbHntKAlUDGRPrKfizSqYWkchXXCKVbtg4JEsIVz3f+yp2r+q1p9ewFrObfbr1VODCP3FGRvzkd8f2pr7nt8TKq0gkcY3EXlhQYTAaok1JddrdB09PajUV1Zs1sBETHn9DAmVAMP48MDdbSepQd/W5HsYXRhIcF6gVPTHEkLdzANGtgFUZZXsjcr/tweD530X8ufifviT98Wpu7w6Z5RUuEfif5PhNk8wNGR/EcMR4tb0ml4dRbgw5NOR51yu9hZVFD5ZyyIHDEE/7Z79STW/69r40+LGOPUBV9/0geVuA9s6+Ntfs3R8Ol8c/ek6YqUeF0/j4wxiRbDT7hnN5XtH6LXy3H+Cqn9Ex8uLXmxMxUUq5TtaSfeg0xL+FSUTnTXTqqMZKZrDeqmRtP/chdSZGe/NN6v0yswwztL3t6dpbTwZUpFJvyGivM8F/wSaBb5DwtzBgIGt6dO6dc+wOV4YtLRUHLDHJfLVqlEcbBwGrQgD90kdRb9jMoBl7d0F3zBpu6N2janb48K3pCJKO0b5QyTXaUg== x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?IGyhaYWZKovlAuLT6X4wyan4u+QfdRiVqXZ5UwTxUv7XSPAoLDBjJE0fr9GR?= =?us-ascii?Q?kZ83QiRwB6Y0BMYHNScF2nZ0+km632sAfcZwG8rO8DEkZHI7embAdT1BwxnD?= =?us-ascii?Q?FJFjjHBDJpIfoDNv4ViLoeuE5UIQ3eLWhptD4/QPyL1naZtrVfGOvW0BgM3G?= =?us-ascii?Q?gkzg8qqe8sT3HbwjPJczGWLeM+e3ylmqnmOLKQF3oJiWFEMix64vKC+ThDgx?= =?us-ascii?Q?jDf7CQgSC2czehwtW+mxvizRstxkU4GSBlsgna4mQay22ehIzf9Ob8ExrJjF?= =?us-ascii?Q?G0Po1cOUtdLkS9UdQG8sL5LQIHclH2iNj0UqVyJR/HK9Tzx1DQra8AK6//u3?= =?us-ascii?Q?gBweRAUrEXmBHPLHNdTgtIwJU27lwfKyqBVd1X8n/pWCEJuZI361aT+pqvPP?= =?us-ascii?Q?BdGhf7Fp2B2IfQJ7PefEvUOTMvCH8SFv8NzX27bYj5JFdm1g7qU9rdB+SLhs?= =?us-ascii?Q?ROZtb4PQVGuTGHhKeJeHMt3LI4gBGGxxdFPtUig/0qkOchVf7q4HWXcxEQr8?= =?us-ascii?Q?pIwlewgRrgmGYWnQIinBMnMLWkuzJtLtW5i0ZRlqAiPOBDIBkP5Jf83pjo+n?= =?us-ascii?Q?7Ou1MoZFwLpE0LFhWpaktbKAgCb83JgBBJb9xg8uU1CXx5j7yBIlLsA/DJyC?= =?us-ascii?Q?20LEVQjOWRao/Gki4MmmRfHwQj1Uf6Qh/ONQdkwfBLWaP1fEOO8N2bizVYb0?= =?us-ascii?Q?3ZHDEvCgYLUXmcqEDMKa0EEIDvyh2vjs/Slcy/ulemuBPChcd2ffhwJuymVV?= =?us-ascii?Q?9R737Ir8SASZV1706mEafqnwQmGKZ2aAmNbkcY3+D2cBbXXnN2ys1JudLqhm?= =?us-ascii?Q?LVZqYsEiqDKQ1fZ35DsOViQ8oWQRduN3NrypEtHMzRzlYoMFWKrgDfV70rL4?= =?us-ascii?Q?sH/7KRhEYQEj97jt548d9vYX+wAWrhE1xievkkQgDLKs0brsWpQdbKSPAVFO?= =?us-ascii?Q?KRwpFS4uqa9CsnupBZiv4Wm5TD08Boh+faFBL1HMTLKclLqKNRTyiFe9wxKN?= =?us-ascii?Q?LocAqEv0a6MQWWd8UnvHc/RWsb//jwg3ON6SpAEuLLzZfzCUO6gPvwwAel0f?= =?us-ascii?Q?Uuff0Jm58uuxzpUnw+DAWOs5TM0yf1YrT8aq+PnMKEMRPWs3AJ3RN79fL7fB?= =?us-ascii?Q?ySVQ+5w0tI3nBN4GAFt7TskGZK6wFVX57rOQxRtrt8xiAHFvIPcP42+iKPy4?= =?us-ascii?Q?AerIvweWAHzaaoxQIV/OP3lioTTeDfI//EudAA4SB8+pSUa3CpFE9R0PzmAi?= =?us-ascii?Q?E7dbzFj4kRLGUK/m6+hpDXbDJfTMdXIbn8uQtQfO4MkGj8cOnsZTu+Kejili?= =?us-ascii?Q?TkE/fB13DDAiuEAFK8h39eRRofxgiw27z2NYR/TPW0VLTdWq5CFF4EcP+KqF?= =?us-ascii?Q?aAlJjoJV/5s1uJBl81Xg82VTeFWxo9aolKqQnSq8iQYUoYFp3uwaNcAFsPzb?= =?us-ascii?Q?hFAPj5KWrMT7CDG/TeB5nsWhb2hNH7Kw4jnw61IY19584KVPGRKdgxXkBgDN?= =?us-ascii?Q?EXPzPJXD40gZHcrgUau+qgXijlf7B3EaWoAp85GrD6E41Af2vE/i6ojI0ow1?= =?us-ascii?Q?8q4s+Fka7mXDmUphNxAtzlKICbUvYdnOlZOcnvbd?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MW4PR11MB5872.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 002f2829-f6bf-4a9e-693e-08dba2537e13 X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Aug 2023 14:32:48.4195 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: YWEddmuF8ZDwI01ufkpKAGvkbmdqH3wF8iFjhm4IKNn7lIXVTj5Mrj0zthQaDd0JL3AEnDpvGKC2t8I/pkoM8g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA2PR11MB4876 X-OriginatorOrg: intel.com Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,jiewen.yao@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: vPNGu9SsBGAJzER6qcBR2CTPx7686176AA= Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=qBv0FNwg; arc=reject ("signature check failed: fail, {[1] = sig:microsoft.com:reject}"); dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=intel.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io Hi This fix breaks the compatibility. Have you tested all features that depends on this data structure? Thank you Yao, Jiewen > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of Elyes Haou= as > Sent: Sunday, August 20, 2023 8:07 PM > To: devel@edk2.groups.io > Cc: Elyes Haouas > Subject: [edk2-devel] [PATCH] Use C99 flexible arrays >=20 > Use C99 flexible arrays instead of older style of one-element or > zero-length arrays. > It allows the compiler to generate errors when the flexible array does > not occur at the end in the structure. >=20 > Signed-off-by: Elyes Haouas > --- > EmbeddedPkg/Include/fdt.h | 4 ++-- > .../Library/FrameBufferBltLib/FrameBufferBltLib.c | 2 +- > MdePkg/Include/IndustryStandard/IpmiNetFnApp.h | 8 ++++---- > MdePkg/Include/IndustryStandard/IpmiNetFnChassis.h | 4 ++-- > MdePkg/Include/IndustryStandard/IpmiNetFnStorage.h | 6 +++--- > MdePkg/Include/IndustryStandard/IpmiNetFnTransport.h | 8 ++++---- > MdePkg/Include/IndustryStandard/PldmSmbiosTransfer.h | 8 ++++---- > MdePkg/Include/IndustryStandard/TcgStorageCore.h | 6 +++--- > MdePkg/Include/Protocol/NetworkInterfaceIdentifier.h | 2 +- > MdePkg/Include/Protocol/NvdimmLabel.h | 2 +- > UefiPayloadPkg/Include/Coreboot.h | 10 +++++----- > 11 files changed, 30 insertions(+), 30 deletions(-) >=20 > diff --git a/EmbeddedPkg/Include/fdt.h b/EmbeddedPkg/Include/fdt.h > index 120dbc8bc6..f64695da5c 100644 > --- a/EmbeddedPkg/Include/fdt.h > +++ b/EmbeddedPkg/Include/fdt.h > @@ -81,14 +81,14 @@ struct fdt_reserve_entry { >=20 >=20 > struct fdt_node_header { >=20 > fdt32_t tag; >=20 > - char name[0]; >=20 > + char name[]; >=20 > }; >=20 >=20 >=20 > struct fdt_property { >=20 > fdt32_t tag; >=20 > fdt32_t len; >=20 > fdt32_t nameoff; >=20 > - char data[0]; >=20 > + char data[]; >=20 > }; >=20 >=20 >=20 > #endif /* !__ASSEMBLY */ >=20 > diff --git a/MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.c > b/MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.c > index 432577bcfd..5fc5779e16 100644 > --- a/MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.c > +++ b/MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.c > @@ -24,7 +24,7 @@ struct FRAME_BUFFER_CONFIGURE { > EFI_PIXEL_BITMASK PixelMasks; >=20 > INT8 PixelShl[4]; // R-G-B-Rsvd >=20 > INT8 PixelShr[4]; // R-G-B-Rsvd >=20 > - UINT8 LineBuffer[0]; >=20 > + UINT8 LineBuffer[]; >=20 > }; >=20 >=20 >=20 > CONST EFI_PIXEL_BITMASK mRgbPixelMasks =3D { >=20 > diff --git a/MdePkg/Include/IndustryStandard/IpmiNetFnApp.h > b/MdePkg/Include/IndustryStandard/IpmiNetFnApp.h > index b6bc91f46c..b5174a5042 100644 > --- a/MdePkg/Include/IndustryStandard/IpmiNetFnApp.h > +++ b/MdePkg/Include/IndustryStandard/IpmiNetFnApp.h > @@ -433,7 +433,7 @@ typedef union { > typedef struct { >=20 > UINT8 CompletionCode; >=20 > IPMI_GET_MESSAGE_CHANNEL_NUMBER ChannelNumber; >=20 > - UINT8 MessageData[0]; >=20 > + UINT8 MessageData[]; >=20 > } IPMI_GET_MESSAGE_RESPONSE; >=20 >=20 >=20 > // >=20 > @@ -457,12 +457,12 @@ typedef union { > typedef struct { >=20 > UINT8 CompletionCode; >=20 > IPMI_SEND_MESSAGE_CHANNEL_NUMBER ChannelNumber; >=20 > - UINT8 MessageData[0]; >=20 > + UINT8 MessageData[]; >=20 > } IPMI_SEND_MESSAGE_REQUEST; >=20 >=20 >=20 > typedef struct { >=20 > UINT8 CompletionCode; >=20 > - UINT8 ResponseData[0]; >=20 > + UINT8 ResponseData[]; >=20 > } IPMI_SEND_MESSAGE_RESPONSE; >=20 >=20 >=20 > // >=20 > @@ -906,7 +906,7 @@ typedef union { > typedef struct { >=20 > IPMI_SET_USER_PASSWORD_USER_ID UserId; >=20 > IPMI_SET_USER_PASSWORD_OPERATION Operation; >=20 > - UINT8 PasswordData[0]; // 16 or 20 bytes= , depending on the > 'PasswordSize' field >=20 > + UINT8 PasswordData[]; // 16 or 20 bytes,= depending on the > 'PasswordSize' field >=20 > } IPMI_SET_USER_PASSWORD_REQUEST; >=20 >=20 >=20 > // >=20 > diff --git a/MdePkg/Include/IndustryStandard/IpmiNetFnChassis.h > b/MdePkg/Include/IndustryStandard/IpmiNetFnChassis.h > index e3b8a62105..44024da69c 100644 > --- a/MdePkg/Include/IndustryStandard/IpmiNetFnChassis.h > +++ b/MdePkg/Include/IndustryStandard/IpmiNetFnChassis.h > @@ -183,7 +183,7 @@ typedef union { >=20 >=20 > typedef struct { >=20 > IPMI_SET_BOOT_OPTIONS_PARAMETER_VALID ParameterValid; >=20 > - UINT8 ParameterData[0]; >=20 > + UINT8 ParameterData[]; >=20 > } IPMI_SET_BOOT_OPTIONS_REQUEST; >=20 >=20 >=20 > typedef struct { >=20 > @@ -415,7 +415,7 @@ typedef struct { > UINT8 CompletionCode; >=20 > IPMI_GET_BOOT_OPTIONS_PARAMETER_VERSION ParameterVersion; >=20 > IPMI_GET_BOOT_OPTIONS_PARAMETER_VALID ParameterValid; >=20 > - UINT8 ParameterData[0]; >=20 > + UINT8 ParameterData[]; >=20 > } IPMI_GET_BOOT_OPTIONS_RESPONSE; >=20 >=20 >=20 > // >=20 > diff --git a/MdePkg/Include/IndustryStandard/IpmiNetFnStorage.h > b/MdePkg/Include/IndustryStandard/IpmiNetFnStorage.h > index 553a69a472..755bcb67e5 100644 > --- a/MdePkg/Include/IndustryStandard/IpmiNetFnStorage.h > +++ b/MdePkg/Include/IndustryStandard/IpmiNetFnStorage.h > @@ -76,7 +76,7 @@ typedef struct { > typedef struct { >=20 > UINT8 CompletionCode; >=20 > UINT8 CountReturned; >=20 > - UINT8 Data[0]; >=20 > + UINT8 Data[]; >=20 > } IPMI_READ_FRU_DATA_RESPONSE; >=20 >=20 >=20 > // >=20 > @@ -95,7 +95,7 @@ typedef struct { > typedef struct { >=20 > UINT8 DeviceId; >=20 > UINT16 InventoryOffset; >=20 > - UINT8 Data[0]; >=20 > + UINT8 Data[]; >=20 > } IPMI_WRITE_FRU_DATA_REQUEST; >=20 >=20 >=20 > typedef struct { >=20 > @@ -594,7 +594,7 @@ typedef struct { > UINT16 RecordId; >=20 > UINT8 OffsetIntoRecord; >=20 > UINT8 InProgress; >=20 > - UINT8 RecordData[0]; >=20 > + UINT8 RecordData[]; >=20 > } IPMI_PARTIAL_ADD_SEL_ENTRY_REQUEST; >=20 >=20 >=20 > typedef struct { >=20 > diff --git a/MdePkg/Include/IndustryStandard/IpmiNetFnTransport.h > b/MdePkg/Include/IndustryStandard/IpmiNetFnTransport.h > index 2024c35f7f..273a162552 100644 > --- a/MdePkg/Include/IndustryStandard/IpmiNetFnTransport.h > +++ b/MdePkg/Include/IndustryStandard/IpmiNetFnTransport.h > @@ -313,7 +313,7 @@ typedef union { > typedef struct { >=20 > IPMI_SET_LAN_CONFIG_CHANNEL_NUM ChannelNumber; >=20 > UINT8 ParameterSelector; >=20 > - UINT8 ParameterData[0]; >=20 > + UINT8 ParameterData[]; >=20 > } IPMI_SET_LAN_CONFIGURATION_PARAMETERS_COMMAND_REQUEST; >=20 >=20 >=20 > // >=20 > @@ -343,7 +343,7 @@ typedef struct { > typedef struct { >=20 > UINT8 CompletionCode; >=20 > UINT8 ParameterRevision; >=20 > - UINT8 ParameterData[0]; >=20 > + UINT8 ParameterData[]; >=20 > } IPMI_GET_LAN_CONFIGURATION_PARAMETERS_RESPONSE; >=20 >=20 >=20 > // >=20 > @@ -879,7 +879,7 @@ typedef union { > typedef struct { >=20 > IPMI_SET_SOL_CONFIG_PARAM_CHANNEL_NUM ChannelNumber; >=20 > UINT8 ParameterSelector; >=20 > - UINT8 ParameterData[0]; >=20 > + UINT8 ParameterData[]; >=20 > } IPMI_SET_SOL_CONFIGURATION_PARAMETERS_REQUEST; >=20 >=20 >=20 > // >=20 > @@ -909,7 +909,7 @@ typedef struct { > typedef struct { >=20 > UINT8 CompletionCode; >=20 > UINT8 ParameterRevision; >=20 > - UINT8 ParameterData[0]; >=20 > + UINT8 ParameterData[]; >=20 > } IPMI_GET_SOL_CONFIGURATION_PARAMETERS_RESPONSE; >=20 >=20 >=20 > #pragma pack() >=20 > diff --git a/MdePkg/Include/IndustryStandard/PldmSmbiosTransfer.h > b/MdePkg/Include/IndustryStandard/PldmSmbiosTransfer.h > index 9b7a5e838e..3e72812ea7 100644 > --- a/MdePkg/Include/IndustryStandard/PldmSmbiosTransfer.h > +++ b/MdePkg/Include/IndustryStandard/PldmSmbiosTransfer.h > @@ -92,7 +92,7 @@ typedef struct { > typedef struct { >=20 > UINT32 NextDataTransferHandle; >=20 > UINT8 TransferFlag; >=20 > - UINT8 Table[0]; >=20 > + UINT8 Table[]; >=20 > } PLDM_GET_SMBIOS_STRUCTURE_TABLE_RESPONSE; >=20 >=20 >=20 > typedef struct { >=20 > @@ -106,7 +106,7 @@ typedef struct { > typedef struct { >=20 > UINT32 DataTransferHandle; >=20 > UINT8 TransferFlag; >=20 > - UINT8 Table[0]; >=20 > + UINT8 Table[]; >=20 > } PLDM_SET_SMBIOS_STRUCTURE_TABLE_REQUEST; >=20 >=20 >=20 > typedef struct { >=20 > @@ -143,7 +143,7 @@ typedef struct { > typedef struct { >=20 > UINT32 NextDataTransferHandle; >=20 > UINT8 TransferFlag; >=20 > - UINT8 Table[0]; >=20 > + UINT8 Table[]; >=20 > } PLDM_GET_SMBIOS_STRUCTURE_BY_TYPE_RESPONSE; >=20 >=20 >=20 > typedef struct { >=20 > @@ -171,7 +171,7 @@ typedef struct { > typedef struct { >=20 > UINT32 NextDataTransferHandle; >=20 > UINT8 TransferFlag; >=20 > - UINT8 Table[0]; >=20 > + UINT8 Table[]; >=20 > } PLDM_GET_SMBIOS_STRUCTURE_BY_HANDLE_RESPONSE; >=20 >=20 >=20 > typedef struct { >=20 > diff --git a/MdePkg/Include/IndustryStandard/TcgStorageCore.h > b/MdePkg/Include/IndustryStandard/TcgStorageCore.h > index 1fae7b6e84..7502e3d46c 100644 > --- a/MdePkg/Include/IndustryStandard/TcgStorageCore.h > +++ b/MdePkg/Include/IndustryStandard/TcgStorageCore.h > @@ -38,7 +38,7 @@ typedef struct { > UINT32 OutstandingDataBE; >=20 > UINT32 MinTransferBE; >=20 > UINT32 LengthBE; >=20 > - UINT8 Payload[0]; >=20 > + UINT8 Payload[]; >=20 > } TCG_COM_PACKET; >=20 >=20 >=20 > typedef struct { >=20 > @@ -49,7 +49,7 @@ typedef struct { > UINT16 AckTypeBE; >=20 > UINT32 AcknowledgementBE; >=20 > UINT32 LengthBE; >=20 > - UINT8 Payload[0]; >=20 > + UINT8 Payload[]; >=20 > } TCG_PACKET; >=20 >=20 >=20 > #define TCG_SUBPACKET_ALIGNMENT 4// 4-byte alignment per spec >=20 > @@ -58,7 +58,7 @@ typedef struct { > UINT8 ReservedBE[6]; >=20 > UINT16 KindBE; >=20 > UINT32 LengthBE; >=20 > - UINT8 Payload[0]; >=20 > + UINT8 Payload[]; >=20 > } TCG_SUB_PACKET; >=20 >=20 >=20 > #define SUBPACKET_KIND_DATA 0x0000 >=20 > diff --git a/MdePkg/Include/Protocol/NetworkInterfaceIdentifier.h > b/MdePkg/Include/Protocol/NetworkInterfaceIdentifier.h > index 78acb4ddae..85d904ca9c 100644 > --- a/MdePkg/Include/Protocol/NetworkInterfaceIdentifier.h > +++ b/MdePkg/Include/Protocol/NetworkInterfaceIdentifier.h > @@ -101,7 +101,7 @@ struct undiconfig_table { > struct { >=20 > VOID *NII_InterfacePointer; ///< Pointer to the NII inte= rface structure. >=20 > VOID *DevicePathPointer; ///< Pointer to the device p= ath for this NIC. >=20 > - } NII_entry[1]; >=20 > + } NII_entry[]; >=20 > }; >=20 >=20 >=20 > extern EFI_GUID gEfiNetworkInterfaceIdentifierProtocolGuid; >=20 > diff --git a/MdePkg/Include/Protocol/NvdimmLabel.h > b/MdePkg/Include/Protocol/NvdimmLabel.h > index e46999a3ab..91a9b675f9 100644 > --- a/MdePkg/Include/Protocol/NvdimmLabel.h > +++ b/MdePkg/Include/Protocol/NvdimmLabel.h > @@ -244,7 +244,7 @@ typedef struct { > /// >=20 > /// Array size is 1 if EFI_NVDIMM_LABEL_FLAGS_LOCAL is set indicating = a Local > Namespaces. >=20 > /// >=20 > - EFI_NVDIMM_LABEL_SET_COOKIE_MAP Mapping[0]; >=20 > + EFI_NVDIMM_LABEL_SET_COOKIE_MAP Mapping[]; >=20 > } EFI_NVDIMM_LABEL_SET_COOKIE_INFO; >=20 >=20 >=20 > /** >=20 > diff --git a/UefiPayloadPkg/Include/Coreboot.h > b/UefiPayloadPkg/Include/Coreboot.h > index 2d454f7c89..a53ede390c 100644 > --- a/UefiPayloadPkg/Include/Coreboot.h > +++ b/UefiPayloadPkg/Include/Coreboot.h > @@ -59,7 +59,7 @@ struct cbmem_root { > UINT32 num_entries; >=20 > UINT32 locked; >=20 > UINT32 size; >=20 > - struct cbmem_entry entries[0]; >=20 > + struct cbmem_entry entries[]; >=20 > }; >=20 >=20 >=20 > struct imd_entry { >=20 > @@ -75,7 +75,7 @@ struct imd_root { > UINT32 flags; >=20 > UINT32 entry_align; >=20 > UINT32 max_offset; >=20 > - struct imd_entry entries[0]; >=20 > + struct imd_entry entries[]; >=20 > }; >=20 >=20 >=20 > struct cbuint64 { >=20 > @@ -119,7 +119,7 @@ struct cb_memory_range { > struct cb_memory { >=20 > UINT32 tag; >=20 > UINT32 size; >=20 > - struct cb_memory_range map[0]; >=20 > + struct cb_memory_range map[]; >=20 > }; >=20 >=20 >=20 > #define CB_TAG_MAINBOARD 0x0003 >=20 > @@ -129,7 +129,7 @@ struct cb_mainboard { > UINT32 size; >=20 > UINT8 vendor_idx; >=20 > UINT8 part_number_idx; >=20 > - UINT8 strings[0]; >=20 > + UINT8 strings[]; >=20 > }; >=20 >=20 >=20 > #define CB_TAG_VERSION 0x0004 >=20 > @@ -146,7 +146,7 @@ struct cb_mainboard { > struct cb_string { >=20 > UINT32 tag; >=20 > UINT32 size; >=20 > - UINT8 string[0]; >=20 > + UINT8 string[]; >=20 > }; >=20 >=20 >=20 > #define CB_TAG_SERIAL 0x000f >=20 > -- > 2.40.1 >=20 >=20 >=20 > -=3D-=3D-=3D-=3D-=3D-=3D > Groups.io Links: You receive all messages sent to this group. > View/Reply Online (#107898): https://edk2.groups.io/g/devel/message/10789= 8 > Mute This Topic: https://groups.io/mt/100861513/1772286 > Group Owner: devel+owner@edk2.groups.io > Unsubscribe: https://edk2.groups.io/g/devel/unsub [jiewen.yao@intel.com] > -=3D-=3D-=3D-=3D-=3D-=3D >=20 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#107919): https://edk2.groups.io/g/devel/message/107919 Mute This Topic: https://groups.io/mt/100861513/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-