Patrick Georgi has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39406 )
Change subject: Treewide: Add some gcc's warning options ......................................................................
Patch Set 2:
Patch Set 2: Code-Review+2
Tested with scanbuild as well. No issues there.
We might want a way to disable the warnings for local builds, maybe tied to the "use any toolchain" option. Or not. I'm just not sure what versions of GCC people use if they're not using the coreboot toolchain, and I don't know what version of GCC these warnings were added.
Users of custom toolchains are mostly on their own, but such devs can choose to move flags that affect them into xcompile, which tests if compilers understand the flags.