ron minnich has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/36946 )
Change subject: Fix a handful of compiler warnings ......................................................................
Patch Set 6:
(2 comments)
The first fix seems very questionable to me. The inventors of the C language moved to using enums as used in flash.h decades ago. Ref: many parts of Plan 9.
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 people who invented C and the preprocessor, changed their thinking in the 1980s and recommended the use of enums, and even anonymous enums. I'm shocked that a modern C compiler would drive a change like this.
https://review.coreboot.org/c/flashrom/+/36946/6/util/ich_descriptors_tool/i... File util/ich_descriptors_tool/ich_descriptors_tool.c:
https://review.coreboot.org/c/flashrom/+/36946/6/util/ich_descriptors_tool/i... PS6, Line 155: struct ich_descriptors desc = { }; if it needs to be zero, and it is an auto, just put an explicit memset. That said, if it needs to be 0, since this is main(), just make it a static to get the same effect. It's main.