diff options
author | Elyes Haouas <ehaouas@noos.fr> | 2023-07-30 12:53:47 +0200 |
---|---|---|
committer | Martin L Roth <gaumless@gmail.com> | 2023-08-26 21:17:24 +0000 |
commit | ce655f5bd5053172b8369c666610676a09b17267 (patch) | |
tree | c738b67d6d611db0f64f73d020d8e0781df6fc7b /src/vendorcode/intel/edk2/UDK2017/MdePkg | |
parent | 0c602b614dae135dda1c8860cfc1b69b78d3bf22 (diff) |
vendorcode/intel/edk2: 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.
Change-Id: If093dc08c70c521cbef96ac5b5a7a46b37169bcd
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/76810
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Jan Samek <jan.samek@siemens.com>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Diffstat (limited to 'src/vendorcode/intel/edk2/UDK2017/MdePkg')
-rw-r--r-- | src/vendorcode/intel/edk2/UDK2017/MdePkg/Include/IndustryStandard/TcgStorageCore.h | 6 | ||||
-rw-r--r-- | src/vendorcode/intel/edk2/UDK2017/MdePkg/Include/Protocol/NvdimmLabel.h | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/vendorcode/intel/edk2/UDK2017/MdePkg/Include/IndustryStandard/TcgStorageCore.h b/src/vendorcode/intel/edk2/UDK2017/MdePkg/Include/IndustryStandard/TcgStorageCore.h index 79954df5ad..adacc57f65 100644 --- a/src/vendorcode/intel/edk2/UDK2017/MdePkg/Include/IndustryStandard/TcgStorageCore.h +++ b/src/vendorcode/intel/edk2/UDK2017/MdePkg/Include/IndustryStandard/TcgStorageCore.h @@ -39,7 +39,7 @@ typedef struct { UINT32 OutstandingDataBE; UINT32 MinTransferBE; UINT32 LengthBE; - UINT8 Payload[0]; + UINT8 Payload[]; } TCG_COM_PACKET; typedef struct { @@ -50,7 +50,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 @@ -59,7 +59,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/src/vendorcode/intel/edk2/UDK2017/MdePkg/Include/Protocol/NvdimmLabel.h b/src/vendorcode/intel/edk2/UDK2017/MdePkg/Include/Protocol/NvdimmLabel.h index edfeec0eb0..638ba2bf29 100644 --- a/src/vendorcode/intel/edk2/UDK2017/MdePkg/Include/Protocol/NvdimmLabel.h +++ b/src/vendorcode/intel/edk2/UDK2017/MdePkg/Include/Protocol/NvdimmLabel.h @@ -250,7 +250,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; /** |