From de50a3f94bc4ee596bf87dd1bbcd1aa150d09fe9 Mon Sep 17 00:00:00 2001 From: Arthur Heymans Date: Fri, 23 Aug 2024 00:17:07 +0200 Subject: soc/intel/pmclib.c: Work around compiler bug -Werror=stringop-overread On xeon-sp this is a zero length array. With GCC LTO this triggers the stringop-overread warning. To work around this change the signature of the function from an array to a pointer. Change-Id: Ieee6e9bddc4e738eb560dd0e69dc3087ac9f5da6 Signed-off-by: Arthur Heymans Reviewed-on: https://review.coreboot.org/c/coreboot/+/84042 Tested-by: build bot (Jenkins) Reviewed-by: Nico Huber --- src/soc/intel/common/block/pmc/pmclib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/soc/intel/common/block/pmc/pmclib.c b/src/soc/intel/common/block/pmc/pmclib.c index 7650fe4b10..0b3863a0f0 100644 --- a/src/soc/intel/common/block/pmc/pmclib.c +++ b/src/soc/intel/common/block/pmc/pmclib.c @@ -94,7 +94,7 @@ static void migrate_power_state(int is_recovery) CBMEM_CREATION_HOOK(migrate_power_state); static void print_num_status_bits(int num_bits, uint32_t status, - const char *const bit_names[]) + const char *const *bit_names) { int i; -- cgit v1.2.3