Jakub Czapiga has submitted this change. ( https://review.coreboot.org/c/coreboot/+/76842?usp=email )
Change subject: security/tpm/tpm{1,2}_log_serialized.h: Use C99 flexible arrays ......................................................................
security/tpm/tpm{1,2}_log_serialized.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: I79e4b34fe682f5f21415cb93cf65394881173b34 Signed-off-by: Elyes Haouas ehaouas@noos.fr Reviewed-on: https://review.coreboot.org/c/coreboot/+/76842 Reviewed-by: Felix Singer service+coreboot-gerrit@felixsinger.de Tested-by: build bot (Jenkins) no-reply@coreboot.org --- M src/security/tpm/tpm1_log_serialized.h M src/security/tpm/tpm2_log_serialized.h 2 files changed, 2 insertions(+), 2 deletions(-)
Approvals: build bot (Jenkins): Verified Felix Singer: Looks good to me, approved
diff --git a/src/security/tpm/tpm1_log_serialized.h b/src/security/tpm/tpm1_log_serialized.h index a8b7a60..7c7d51a 100644 --- a/src/security/tpm/tpm1_log_serialized.h +++ b/src/security/tpm/tpm1_log_serialized.h @@ -41,7 +41,7 @@ struct spec_id_event_data spec_id; struct tpm_1_vendor vendor;
- struct tpm_1_log_entry entries[0]; /* Variable number of entries */ + struct tpm_1_log_entry entries[]; /* Variable number of entries */ } __packed;
#endif diff --git a/src/security/tpm/tpm2_log_serialized.h b/src/security/tpm/tpm2_log_serialized.h index 2b4e43c..a11a2f6 100644 --- a/src/security/tpm/tpm2_log_serialized.h +++ b/src/security/tpm/tpm2_log_serialized.h @@ -64,7 +64,7 @@ struct tpm_digest_sizes digest_sizes[1]; uint8_t vendor_info_size; struct tpm_2_vendor vendor; - struct tpm_2_log_entry entries[0]; /* Variable number of entries */ + struct tpm_2_log_entry entries[]; /* Variable number of entries */ } __packed;
#endif