summaryrefslogtreecommitdiffstats
path: root/libflashrom.c
diff options
context:
space:
mode:
authorAngel Pons <th3fanbus@gmail.com>2020-05-27 12:15:51 +0200
committerAngel Pons <th3fanbus@gmail.com>2020-05-28 21:09:38 +0000
commit3a0c1966e4c66f91e6e8551e906b6db38002acb4 (patch)
tree916b8fbeb075e871c581507ea2f3eb812506593a /libflashrom.c
parentc7e9a6e15153684672bbadd1fc6baed8247ba0f6 (diff)
downloadflashrom-3a0c1966e4c66f91e6e8551e906b6db38002acb4.tar.gz
flashrom-3a0c1966e4c66f91e6e8551e906b6db38002acb4.tar.bz2
flashrom-3a0c1966e4c66f91e6e8551e906b6db38002acb4.zip
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>
Diffstat (limited to 'libflashrom.c')
-rw-r--r--libflashrom.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libflashrom.c b/libflashrom.c
index ab7e36478..c20d9c71e 100644
--- a/libflashrom.c
+++ b/libflashrom.c
@@ -188,7 +188,8 @@ struct flashrom_board_info *flashrom_supported_boards(void)
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 @@ struct flashrom_chipset_info *flashrom_supported_chipsets(void)
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");