Ryan O'Leary has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/36946 )
Change subject: Fix a handful of compiler warnings ......................................................................
Patch Set 6:
(1 comment)
https://review.coreboot.org/c/flashrom/+/36946/6/flash.h File flash.h:
https://review.coreboot.org/c/flashrom/+/36946/6/flash.h@146 PS6, Line 146: #define OK FLASHROM_TESTED_OK
What C compiler mandated this? It's poor practice. […]
The problem is we have two identical enums flashrom_test_state and test_state. The compiler warned because there were implicit casts between them.
The solution is to remove test_state in favor of flashrom_test_state. These defines alias FLAHSROM_TESTED_X to X, which is different from defining new enum values.
If X was renamed to FLASHROM_TEStED_X in all places, the code would become very verbose. These values are used in 1000s of places and this might add around an additional 100chars to some lines.