Skip to content

Commit 48ff467

Browse files
keesrafaeljw
authored andcommitted
ACPICA: actbl1: Replace 1-element arrays with flexible arrays
ACPICA commit 8c9bd5d151f77767b2fd937911848b7159dc8ee9 Similar to "Replace one-element array with flexible-array", replace the 1-element array with a proper flexible array member as defined by C99. This allows the code to operate without tripping compile-time and run- time bounds checkers (e.g. via __builtin_object_size(), -fsanitize=bounds, and/or -fstrict-flex-arrays=3). No .text nor .data differences result from this change. Link: acpica/acpica@8c9bd5d1 Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent 94bf7c8 commit 48ff467

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

include/acpi/actbl1.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -944,7 +944,7 @@ struct acpi_table_drtm {
944944

945945
struct acpi_drtm_vtable_list {
946946
u32 validated_table_count;
947-
u64 validated_tables[1];
947+
u64 validated_tables[];
948948
};
949949

950950
/* 2) Resources List (of Resource Descriptors) */
@@ -959,7 +959,7 @@ struct acpi_drtm_resource {
959959

960960
struct acpi_drtm_resource_list {
961961
u32 resource_count;
962-
struct acpi_drtm_resource resources[1];
962+
struct acpi_drtm_resource resources[];
963963
};
964964

965965
/* 3) Platform-specific Identifiers List */
@@ -982,7 +982,7 @@ struct acpi_table_ecdt {
982982
struct acpi_generic_address data; /* Address of EC data register */
983983
u32 uid; /* Unique ID - must be same as the EC _UID method */
984984
u8 gpe; /* The GPE for the EC */
985-
u8 id[1]; /* Full namepath of the EC in the ACPI namespace */
985+
u8 id[]; /* Full namepath of the EC in the ACPI namespace */
986986
};
987987

988988
/*******************************************************************************

0 commit comments

Comments
 (0)