diff options
author | Stefan Reinauer <stefan.reinauer@coreboot.org> | 2017-06-27 00:27:32 +0200 |
---|---|---|
committer | Stefan Reinauer <stefan.reinauer@coreboot.org> | 2017-06-27 23:54:03 +0000 |
commit | 42b37f537ff59eb28b85f99cc592d14724788575 (patch) | |
tree | 97b33b94e0621eeced44e3dbbe01e289c369a0e1 /src | |
parent | 0b4d5648f2996ccb07a6a44f1d0276f9a2903f25 (diff) | |
download | coreboot-42b37f537ff59eb28b85f99cc592d14724788575.tar.xz |
clang: Allow initializer overrides
In the code we do the following in a number of places
to pre-initialize an array with a certain value before
overwriting some of the array with other values:
u8 mainboard_picr_data[FCH_INT_TABLE_SIZE] = {
[0 ... FCH_INT_TABLE_SIZE-1] = 0x1F,
}
clang does not like that behavior unless we specify
the option -Wno-initializer-overrides.
Remove the check for gcc in those places, too, because
1) it would silently change array contents between compilers
2) the check isn't sufficient to determine compilation on
clang vs gcc
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Change-Id: I93cc121b6fec099fcdbd5fd1114c2ff7cbc291dc
Reviewed-on: https://review.coreboot.org/20384
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/mainboard/amd/db-ft3b-lc/mainboard.c | 4 | ||||
-rw-r--r-- | src/mainboard/pcengines/apu2/mainboard.c | 4 |
2 files changed, 0 insertions, 8 deletions
diff --git a/src/mainboard/amd/db-ft3b-lc/mainboard.c b/src/mainboard/amd/db-ft3b-lc/mainboard.c index 419a57d8fa..a99d15ce8c 100644 --- a/src/mainboard/amd/db-ft3b-lc/mainboard.c +++ b/src/mainboard/amd/db-ft3b-lc/mainboard.c @@ -43,9 +43,7 @@ * MP Tables. TODO: Make ACPI use these values too. */ static const u8 mainboard_picr_data[FCH_INT_TABLE_SIZE] = { -#if defined(__GNUC__) [0 ... FCH_INT_TABLE_SIZE-1] = 0x1F, -#endif /* INTA# - INTH# */ [0x00] = 0x0A,0x0B,0x0A,0x0B,0x0A,0x0B,0x0A,0x0B, /* Misc-nil,0,1,2, INT from Serial irq */ @@ -61,9 +59,7 @@ static const u8 mainboard_picr_data[FCH_INT_TABLE_SIZE] = { }; static const u8 mainboard_intr_data[FCH_INT_TABLE_SIZE] = { -#if defined(__GNUC__) [0 ... FCH_INT_TABLE_SIZE-1] = 0x1F, -#endif /* INTA# - INTH# */ [0x00] = 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17, /* Misc-nil,0,1,2, INT from Serial irq */ diff --git a/src/mainboard/pcengines/apu2/mainboard.c b/src/mainboard/pcengines/apu2/mainboard.c index 043bc172d0..c1ea016bb1 100644 --- a/src/mainboard/pcengines/apu2/mainboard.c +++ b/src/mainboard/pcengines/apu2/mainboard.c @@ -50,9 +50,7 @@ * MP Tables. TODO: Make ACPI use these values too. */ static const u8 mainboard_picr_data[FCH_INT_TABLE_SIZE] = { -#if defined(__GNUC__) [0 ... FCH_INT_TABLE_SIZE-1] = 0x1F, -#endif /* INTA# - INTH# */ [0x00] = 0x03,0x03,0x05,0x07,0x0B,0x0A,0x1F,0x1F, /* Misc-nil,0,1,2, INT from Serial irq */ @@ -75,9 +73,7 @@ static const u8 mainboard_picr_data[FCH_INT_TABLE_SIZE] = { }; static const u8 mainboard_intr_data[FCH_INT_TABLE_SIZE] = { -#if defined(__GNUC__) [0 ... FCH_INT_TABLE_SIZE-1] = 0x1F, -#endif /* INTA# - INTH# */ [0x00] = 0x10,0x10,0x12,0x13,0x14,0x15,0x1F,0x1F, /* Misc-nil,0,1,2, INT from Serial irq */ |