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 67A5B941A64 for ; Wed, 23 Aug 2023 21:41:45 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=p5O+T7qnMlGguUykbmhzR8OmhnOhicZc/dsJ1ZN8YFs=; c=relaxed/simple; d=groups.io; h=Feedback-ID:Message-ID:Date:MIME-Version:User-Agent:Subject:To:Cc:References:From:In-Reply-To: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=1692826903; v=1; b=PlyCpcmsiXvWbHRxL1BwHXmTeES6zq2QfSELP+d6S/pUX0PujRex3RLEVBIt1/pxn44lR3eD GkDqylgUxCODk2gVPqDFuhOMnDb3/BPU9NOvVbIAwkYH9EVeP/O7NO8QyWSdtqQg3eDmqE2LApo gMJzWqcUKtiiVGcoioJus1qI= X-Received: by 127.0.0.2 with SMTP id AT5sYY7687511xf29d5vhozL; Wed, 23 Aug 2023 14:41:43 -0700 X-Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by mx.groups.io with SMTP id smtpd.web11.534.1692826902793823187 for ; Wed, 23 Aug 2023 14:41:43 -0700 X-Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id F14335C01D8; Wed, 23 Aug 2023 17:41:41 -0400 (EDT) X-Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Wed, 23 Aug 2023 17:41:41 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedruddvhedgtdduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtkeertddtfeejnecuhfhrohhmpeftvggs vggttggrucevrhgrnhcuoehrvggsvggttggrsegsshguihhordgtohhmqeenucggtffrrg htthgvrhhnpefftdfgudeiieegffehhfduveeiudelveejleelkedvgfdtueduueduteef vdduleenucffohhmrghinhepmhhitghrohhsohhfthdrtghomhdpghhrohhuphhsrdhioh enucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehrvggs vggttggrsegsshguihhordgtohhm X-ME-Proxy: Feedback-ID: i5b994698:Fastmail X-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 23 Aug 2023 17:41:40 -0400 (EDT) Message-ID: Date: Wed, 23 Aug 2023 15:41:33 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [edk2-devel] [PATCH] Use C99 flexible arrays To: devel@edk2.groups.io, afish@apple.com, ehaouas@noos.fr Cc: "Yao, Jiewen" References: <2096203168.82564.1692636984521@wsfrf1447.priv.atos.fr> <7F57F8F5-9C13-4DD1-96CE-C3F7A33A1AFF@apple.com> From: "Rebecca Cran" In-Reply-To: <7F57F8F5-9C13-4DD1-96CE-C3F7A33A1AFF@apple.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,rebecca@bsdio.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: 2FLvJPyb9oPQwzShfR3IVJDOx7686176AA= Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=PlyCpcms; dmarc=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 With Visual Studio 2019 adding C11 and C17 support as first-class features, I think we should be safe nowadays to rely on them. But we should check if older versions that we still support (VS 2015 etc.) support them too. https://devblogs.microsoft.com/cppblog/c11-and-c17-standard-support-arriving-in-msvc/ -- Rebecca Cran On 8/22/23 09:28, Andrew Fish via groups.io wrote: > My understanding is zero length arrays have not been legal C code > since C89. They may still function as a compiler extension. > > struct foo { >   size_t len; >   char. Str[]0]; > }; > > I seem to remember the reason we did not use the C99 flexible array > members is back in the day as Visual Studio 2003 did not have proper > C99 support, and did not support it. > > struct foo { >   size_t len; >   char. Str[]]; > }; > > I think the recommended C89 method for doing this is: > > struct foo { >   size_t len; >   char. Str[]1]; > }; > > But that is not backwards compatible as the sizes are different. > > So it is probably good long term to move to valid C99, but we should > verify we did not break anything. > > Thanks, > > Andrew Fish > > >> On Aug 21, 2023, at 9:56 AM, ehaouas wrote: >> >> ‌ >> Hi, >> >> No, I didn't. >> De : "Yao, Jiewen" >> A : "devel@edk2.groups.io" ,"ehaouas@noos.fr" ,"Yao, Jiewen" >> Envoyé: lundi 21 Août 2023 16:35 >> Objet : RE: [edk2-devel] [PATCH] Use C99 flexible arrays >> 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 Haouas >> > Sent: Sunday, August 20, 2023 8:07 PM >> > To: devel@edk2.groups.io >> > Cc: Elyes Haouas >> > Subject: [edk2-devel] [PATCH] Use C99 flexible arrays >> > >> > 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. >> > >> > 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(-) >> > >> > 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 { >> > >> > >> > struct fdt_node_header { >> > >> > fdt32_t tag; >> > >> > - char name[0]; >> > >> > + char name[]; >> > >> > }; >> > >> > >> > >> > struct fdt_property { >> > >> > fdt32_t tag; >> > >> > fdt32_t len; >> > >> > fdt32_t nameoff; >> > >> > - char data[0]; >> > >> > + char data[]; >> > >> > }; >> > >> > >> > >> > #endif /* !__ASSEMBLY */ >> > >> > 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; >> > >> > INT8 PixelShl[4]; // R-G-B-Rsvd >> > >> > INT8 PixelShr[4]; // R-G-B-Rsvd >> > >> > - UINT8 LineBuffer[0]; >> > >> > + UINT8 LineBuffer[]; >> > >> > }; >> > >> > >> > >> > CONST EFI_PIXEL_BITMASK mRgbPixelMasks = { >> > >> > 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 { >> > >> > UINT8 CompletionCode; >> > >> > IPMI_GET_MESSAGE_CHANNEL_NUMBER ChannelNumber; >> > >> > - UINT8 MessageData[0]; >> > >> > + UINT8 MessageData[]; >> > >> > } IPMI_GET_MESSAGE_RESPONSE; >> > >> > >> > >> > // >> > >> > @@ -457,12 +457,12 @@ typedef union { >> > typedef struct { >> > >> > UINT8 CompletionCode; >> > >> > IPMI_SEND_MESSAGE_CHANNEL_NUMBER ChannelNumber; >> > >> > - UINT8 MessageData[0]; >> > >> > + UINT8 MessageData[]; >> > >> > } IPMI_SEND_MESSAGE_REQUEST; >> > >> > >> > >> > typedef struct { >> > >> > UINT8 CompletionCode; >> > >> > - UINT8 ResponseData[0]; >> > >> > + UINT8 ResponseData[]; >> > >> > } IPMI_SEND_MESSAGE_RESPONSE; >> > >> > >> > >> > // >> > >> > @@ -906,7 +906,7 @@ typedef union { >> > typedef struct { >> > >> > IPMI_SET_USER_PASSWORD_USER_ID UserId; >> > >> > IPMI_SET_USER_PASSWORD_OPERATION Operation; >> > >> > - UINT8 PasswordData[0]; // 16 or 20 bytes, depending on the >> > 'PasswordSize' field >> > >> > + UINT8 PasswordData[]; // 16 or 20 bytes, depending on the >> > 'PasswordSize' field >> > >> > } IPMI_SET_USER_PASSWORD_REQUEST; >> > >> > >> > >> > // >> > >> > 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 { >> > >> > >> > typedef struct { >> > >> > IPMI_SET_BOOT_OPTIONS_PARAMETER_VALID ParameterValid; >> > >> > - UINT8 ParameterData[0]; >> > >> > + UINT8 ParameterData[]; >> > >> > } IPMI_SET_BOOT_OPTIONS_REQUEST; >> > >> > >> > >> > typedef struct { >> > >> > @@ -415,7 +415,7 @@ typedef struct { >> > UINT8 CompletionCode; >> > >> > IPMI_GET_BOOT_OPTIONS_PARAMETER_VERSION ParameterVersion; >> > >> > IPMI_GET_BOOT_OPTIONS_PARAMETER_VALID ParameterValid; >> > >> > - UINT8 ParameterData[0]; >> > >> > + UINT8 ParameterData[]; >> > >> > } IPMI_GET_BOOT_OPTIONS_RESPONSE; >> > >> > >> > >> > // >> > >> > 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 { >> > >> > UINT8 CompletionCode; >> > >> > UINT8 CountReturned; >> > >> > - UINT8 Data[0]; >> > >> > + UINT8 Data[]; >> > >> > } IPMI_READ_FRU_DATA_RESPONSE; >> > >> > >> > >> > // >> > >> > @@ -95,7 +95,7 @@ typedef struct { >> > typedef struct { >> > >> > UINT8 DeviceId; >> > >> > UINT16 InventoryOffset; >> > >> > - UINT8 Data[0]; >> > >> > + UINT8 Data[]; >> > >> > } IPMI_WRITE_FRU_DATA_REQUEST; >> > >> > >> > >> > typedef struct { >> > >> > @@ -594,7 +594,7 @@ typedef struct { >> > UINT16 RecordId; >> > >> > UINT8 OffsetIntoRecord; >> > >> > UINT8 InProgress; >> > >> > - UINT8 RecordData[0]; >> > >> > + UINT8 RecordData[]; >> > >> > } IPMI_PARTIAL_ADD_SEL_ENTRY_REQUEST; >> > >> > >> > >> > typedef struct { >> > >> > 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 { >> > >> > IPMI_SET_LAN_CONFIG_CHANNEL_NUM ChannelNumber; >> > >> > UINT8 ParameterSelector; >> > >> > - UINT8 ParameterData[0]; >> > >> > + UINT8 ParameterData[]; >> > >> > } IPMI_SET_LAN_CONFIGURATION_PARAMETERS_COMMAND_REQUEST; >> > >> > >> > >> > // >> > >> > @@ -343,7 +343,7 @@ typedef struct { >> > typedef struct { >> > >> > UINT8 CompletionCode; >> > >> > UINT8 ParameterRevision; >> > >> > - UINT8 ParameterData[0]; >> > >> > + UINT8 ParameterData[]; >> > >> > } IPMI_GET_LAN_CONFIGURATION_PARAMETERS_RESPONSE; >> > >> > >> > >> > // >> > >> > @@ -879,7 +879,7 @@ typedef union { >> > typedef struct { >> > >> > IPMI_SET_SOL_CONFIG_PARAM_CHANNEL_NUM ChannelNumber; >> > >> > UINT8 ParameterSelector; >> > >> > - UINT8 ParameterData[0]; >> > >> > + UINT8 ParameterData[]; >> > >> > } IPMI_SET_SOL_CONFIGURATION_PARAMETERS_REQUEST; >> > >> > >> > >> > // >> > >> > @@ -909,7 +909,7 @@ typedef struct { >> > typedef struct { >> > >> > UINT8 CompletionCode; >> > >> > UINT8 ParameterRevision; >> > >> > - UINT8 ParameterData[0]; >> > >> > + UINT8 ParameterData[]; >> > >> > } IPMI_GET_SOL_CONFIGURATION_PARAMETERS_RESPONSE; >> > >> > >> > >> > #pragma pack() >> > >> > 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 { >> > >> > UINT32 NextDataTransferHandle; >> > >> > UINT8 TransferFlag; >> > >> > - UINT8 Table[0]; >> > >> > + UINT8 Table[]; >> > >> > } PLDM_GET_SMBIOS_STRUCTURE_TABLE_RESPONSE; >> > >> > >> > >> > typedef struct { >> > >> > @@ -106,7 +106,7 @@ typedef struct { >> > typedef struct { >> > >> > UINT32 DataTransferHandle; >> > >> > UINT8 TransferFlag; >> > >> > - UINT8 Table[0]; >> > >> > + UINT8 Table[]; >> > >> > } PLDM_SET_SMBIOS_STRUCTURE_TABLE_REQUEST; >> > >> > >> > >> > typedef struct { >> > >> > @@ -143,7 +143,7 @@ typedef struct { >> > typedef struct { >> > >> > UINT32 NextDataTransferHandle; >> > >> > UINT8 TransferFlag; >> > >> > - UINT8 Table[0]; >> > >> > + UINT8 Table[]; >> > >> > } PLDM_GET_SMBIOS_STRUCTURE_BY_TYPE_RESPONSE; >> > >> > >> > >> > typedef struct { >> > >> > @@ -171,7 +171,7 @@ typedef struct { >> > typedef struct { >> > >> > UINT32 NextDataTransferHandle; >> > >> > UINT8 TransferFlag; >> > >> > - UINT8 Table[0]; >> > >> > + UINT8 Table[]; >> > >> > } PLDM_GET_SMBIOS_STRUCTURE_BY_HANDLE_RESPONSE; >> > >> > >> > >> > typedef struct { >> > >> > 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; >> > >> > UINT32 MinTransferBE; >> > >> > UINT32 LengthBE; >> > >> > - UINT8 Payload[0]; >> > >> > + UINT8 Payload[]; >> > >> > } TCG_COM_PACKET; >> > >> > >> > >> > typedef struct { >> > >> > @@ -49,7 +49,7 @@ typedef struct { >> > UINT16 AckTypeBE; >> > >> > UINT32 AcknowledgementBE; >> > >> > UINT32 LengthBE; >> > >> > - UINT8 Payload[0]; >> > >> > + UINT8 Payload[]; >> > >> > } TCG_PACKET; >> > >> > >> > >> > #define TCG_SUBPACKET_ALIGNMENT 4// 4-byte alignment per spec >> > >> > @@ -58,7 +58,7 @@ typedef struct { >> > UINT8 ReservedBE[6]; >> > >> > UINT16 KindBE; >> > >> > UINT32 LengthBE; >> > >> > - UINT8 Payload[0]; >> > >> > + UINT8 Payload[]; >> > >> > } TCG_SUB_PACKET; >> > >> > >> > >> > #define SUBPACKET_KIND_DATA 0x0000 >> > >> > 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 { >> > >> > VOID *NII_InterfacePointer; ///< Pointer to the NII interface >> structure. >> > >> > VOID *DevicePathPointer; ///< Pointer to the device path for this NIC. >> > >> > - } NII_entry[1]; >> > >> > + } NII_entry[]; >> > >> > }; >> > >> > >> > >> > extern EFI_GUID gEfiNetworkInterfaceIdentifierProtocolGuid; >> > >> > 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 { >> > /// >> > >> > /// Array size is 1 if EFI_NVDIMM_LABEL_FLAGS_LOCAL is set >> indicating a Local >> > Namespaces. >> > >> > /// >> > >> > - EFI_NVDIMM_LABEL_SET_COOKIE_MAP Mapping[0]; >> > >> > + EFI_NVDIMM_LABEL_SET_COOKIE_MAP Mapping[]; >> > >> > } EFI_NVDIMM_LABEL_SET_COOKIE_INFO; >> > >> > >> > >> > /** >> > >> > 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; >> > >> > UINT32 locked; >> > >> > UINT32 size; >> > >> > - struct cbmem_entry entries[0]; >> > >> > + struct cbmem_entry entries[]; >> > >> > }; >> > >> > >> > >> > struct imd_entry { >> > >> > @@ -75,7 +75,7 @@ struct imd_root { >> > UINT32 flags; >> > >> > UINT32 entry_align; >> > >> > UINT32 max_offset; >> > >> > - struct imd_entry entries[0]; >> > >> > + struct imd_entry entries[]; >> > >> > }; >> > >> > >> > >> > struct cbuint64 { >> > >> > @@ -119,7 +119,7 @@ struct cb_memory_range { >> > struct cb_memory { >> > >> > UINT32 tag; >> > >> > UINT32 size; >> > >> > - struct cb_memory_range map[0]; >> > >> > + struct cb_memory_range map[]; >> > >> > }; >> > >> > >> > >> > #define CB_TAG_MAINBOARD 0x0003 >> > >> > @@ -129,7 +129,7 @@ struct cb_mainboard { >> > UINT32 size; >> > >> > UINT8 vendor_idx; >> > >> > UINT8 part_number_idx; >> > >> > - UINT8 strings[0]; >> > >> > + UINT8 strings[]; >> > >> > }; >> > >> > >> > >> > #define CB_TAG_VERSION 0x0004 >> > >> > @@ -146,7 +146,7 @@ struct cb_mainboard { >> > struct cb_string { >> > >> > UINT32 tag; >> > >> > UINT32 size; >> > >> > - UINT8 string[0]; >> > >> > + UINT8 string[]; >> > >> > }; >> > >> > >> > >> > #define CB_TAG_SERIAL 0x000f >> > >> > -- >> > 2.40.1 >> > >> > >> > >> > -=-=-=-=-=-= >> > Groups.io Links: You receive all messages sent to this group. >> > View/Reply Online (#107898): >> https://edk2.groups.io/g/devel/message/107898 >> > 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] >> > -=-=-=-=-=-= >> > > > -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#107989): https://edk2.groups.io/g/devel/message/107989 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] -=-=-=-=-=-=-=-=-=-=-=-