edist-test: Fix _Static_assert missing message string

Older GCCs don't support _Static_assert without a message string as the
second argument. AFAICT _Static_assert with two arguments is in C11 but
omitting the message argument is an extension.

The tests appear to be built with the system gcc rather than our
crossgcc so that's probably why this was not cought by CI.

Change-Id: I41fd0ffc42ded8b6d145c3ec30cc7407a78b9a43
Signed-off-by: Daniel Gröber <dxld@darkboxed.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/48151
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
This commit is contained in:
Daniel Gröber 2020-11-30 13:30:10 +01:00 committed by Patrick Georgi
parent 7c0f007cf5
commit 2aa15872d2
1 changed files with 2 additions and 1 deletions

View File

@ -43,7 +43,8 @@ struct edid_raw {
uint8_t checksum; uint8_t checksum;
} __packed; } __packed;
_Static_assert(sizeof(struct edid_raw) == 128); _Static_assert(sizeof(struct edid_raw) == 128,
"assert failed: edid_raw size mismatch");
#define EDID_HEADER_RAW { 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00 } #define EDID_HEADER_RAW { 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00 }
#define EDID_HEADER_INVALID_RAW { 0, 0, 0, 0, 0, 0, 0, 0 } #define EDID_HEADER_INVALID_RAW { 0, 0, 0, 0, 0, 0, 0, 0 }