Felix Held has submitted this change. ( https://review.coreboot.org/c/coreboot/+/76846?usp=email )
Change subject: lib/gcov-io.h: Use C99 flexible arrays ......................................................................
lib/gcov-io.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: Iad9cbe16a2d1881d74edcc702be843168df8a4ff Signed-off-by: Elyes Haouas ehaouas@noos.fr Reviewed-on: https://review.coreboot.org/c/coreboot/+/76846 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Felix Singer service+coreboot-gerrit@felixsinger.de --- M src/lib/gcov-io.h 1 file changed, 1 insertion(+), 1 deletion(-)
Approvals: Felix Singer: Looks good to me, approved build bot (Jenkins): Verified
diff --git a/src/lib/gcov-io.h b/src/lib/gcov-io.h index 14524248..af2d292 100644 --- a/src/lib/gcov-io.h +++ b/src/lib/gcov-io.h @@ -443,7 +443,7 @@ gcov_unsigned_t ident; /* unique ident of function */ gcov_unsigned_t lineno_checksum; /* function lineo_checksum */ gcov_unsigned_t cfg_checksum; /* function cfg checksum */ - struct gcov_ctr_info ctrs[0]; /* instrumented counters */ + struct gcov_ctr_info ctrs[]; /* instrumented counters */ };
/* Type of function used to merge counters. */