summaryrefslogtreecommitdiffstats
path: root/src/security
diff options
context:
space:
mode:
authorElyes Haouas <ehaouas@noos.fr>2023-07-30 17:26:13 +0200
committerJakub Czapiga <jacz@semihalf.com>2023-08-01 12:41:50 +0000
commit928584c31d68a59b0ec58b2a4db9d23a43bf4e01 (patch)
treef9dab8ef5c958f04ecfcae71bea1e9911d7cdfdc /src/security
parent16f08cfeaf5534f2dcc4261a0257aba86469bda4 (diff)
downloadcoreboot-928584c31d68a59b0ec58b2a4db9d23a43bf4e01.tar.gz
coreboot-928584c31d68a59b0ec58b2a4db9d23a43bf4e01.tar.bz2
coreboot-928584c31d68a59b0ec58b2a4db9d23a43bf4e01.zip
security/intel/stm/StmApi.h: 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: I3ab3538b276fee5ed135bb4e88d9ef2cd6a00bb9 Signed-off-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/76843 Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/security')
-rw-r--r--src/security/intel/stm/StmApi.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/security/intel/stm/StmApi.h b/src/security/intel/stm/StmApi.h
index af57341fc91b..1a594a7dd0f4 100644
--- a/src/security/intel/stm/StmApi.h
+++ b/src/security/intel/stm/StmApi.h
@@ -42,7 +42,7 @@ typedef struct {
uint32_t additional_dynamic_memory_size;
STM_FEAT stm_features;
uint32_t number_of_rev_ids;
- uint32_t stm_smm_rev_id[1];
+ uint32_t stm_smm_rev_id[];
// The total STM_HEADER should be 4K.
} SOFTWARE_STM_HEADER;
@@ -65,7 +65,7 @@ typedef struct {
typedef struct {
uint32_t image_size;
uint32_t reserved;
- uint64_t image_page_base[1]; //[NumberOfPages];
+ uint64_t image_page_base[]; //[NumberOfPages];
} TXT_BIOS_COMPONENT_UPDATE;
typedef struct {
@@ -413,7 +413,7 @@ typedef struct {
uint16_t length;
uint8_t originating_bus_number;
uint8_t last_node_index;
- STM_PCI_DEVICE_PATH_NODE pci_device_path[1];
+ STM_PCI_DEVICE_PATH_NODE pci_device_path[];
// STM_PCI_DEVICE_PATH_NODE PciDevicePath[LastNodeIndex + 1];
} STM_RSC_PCI_CFG_DESC;
@@ -524,7 +524,7 @@ typedef enum {
typedef struct {
uint32_t page_count;
- uint64_t pages[1]; // number of elements is PageCount
+ uint64_t pages[]; // number of elements is PageCount
} STM_EVENT_LOG_MANAGEMENT_REQUEST_DATA_LOG_BUFFER;
typedef union {