Attention is currently required from: Angel Pons, Elyes Haouas.

Nico Huber would like build bot (Jenkins), Angel Pons and Elyes Haouas to review this change.

View Change

libflashrom.c: Use casts on enum conversions

This allows flashrom to build with GCC 10.

Change-Id: I2166cdf3681452631ef8e980face2924e9a6c81a
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/41775
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: HAOUAS Elyes <ehaouas@noos.fr>
---
M libflashrom.c
1 file changed, 19 insertions(+), 2 deletions(-)

git pull ssh://review.coreboot.org:29418/flashrom refs/changes/61/67861/1
diff --git a/libflashrom.c b/libflashrom.c
index 0dec22e..51ad7d9 100644
--- a/libflashrom.c
+++ b/libflashrom.c
@@ -188,7 +188,8 @@
for (; i < boards_known_size; ++i) {
supported_boards[i].vendor = binfo[i].vendor;
supported_boards[i].name = binfo[i].name;
- supported_boards[i].working = binfo[i].working;
+ supported_boards[i].working =
+ (enum flashrom_test_state) binfo[i].working;
}
} else {
msg_gerr("Memory allocation error!\n");
@@ -226,7 +227,8 @@
supported_chipsets[i].chipset = chipset[i].device_name;
supported_chipsets[i].vendor_id = chipset[i].vendor_id;
supported_chipsets[i].chipset_id = chipset[i].device_id;
- supported_chipsets[i].status = chipset[i].status;
+ supported_chipsets[i].status =
+ (enum flashrom_test_state) chipset[i].status;
}
} else {
msg_gerr("Memory allocation error!\n");

To view, visit change 67861. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: flashrom
Gerrit-Branch: 1.2.x
Gerrit-Change-Id: I2166cdf3681452631ef8e980face2924e9a6c81a
Gerrit-Change-Number: 67861
Gerrit-PatchSet: 1
Gerrit-Owner: Nico Huber <nico.h@gmx.de>
Gerrit-Reviewer: Angel Pons <th3fanbus@gmail.com>
Gerrit-Reviewer: Elyes Haouas <ehaouas@noos.fr>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-Attention: Angel Pons <th3fanbus@gmail.com>
Gerrit-Attention: Elyes Haouas <ehaouas@noos.fr>
Gerrit-MessageType: newchange