Attention is currently required from: Angel Pons, Light, Anastasia Klimchuk. Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/62764 )
Change subject: ich_descriptors.c: Assert unsigned types >=0 on to prevent underflow error ......................................................................
Patch Set 9:
(1 comment)
File ich_descriptors.c:
https://review.coreboot.org/c/flashrom/+/62764/comment/7afa4898_7a89134a PS6, Line 507: assert(j >= 12);
I am not sure, are we using assert in code? I am wondering what other people think. […]
I had a similar thought on the patch around `writeprotect_ranges.c`. Such an assertion would help scan-build. Not sure if it helps humans :)
In this instance, maybe just make it explicit:
for (j = 12; j < num_regions; ++j)
?
If we'd want `assert()` only for function contracts, we could also make exceptions and comment, e.g.
assert(j >= 12); /* to help scan-build */