Felix Singer has submitted this change. ( https://review.coreboot.org/c/coreboot/+/83347?usp=email )
(
6 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. )Change subject: xcompile: Apply -Wextra with temporary exceptions to GCC ......................................................................
xcompile: Apply -Wextra with temporary exceptions to GCC
In order to detect more issues in our code, make GCC more picky by enabling -Wextra. Disable a couple of warnings turned on by -Wextra temporarily in order to keep everything compiling and working for now. The warnings may be enabled step by step later.
Since xcompiles applies to coreboot and libpayload, add Wextra here instead of the top-level Makefile.mk.
Change-Id: I60915cb66581dc2c9b6807335fd0e214b45e76d6 Signed-off-by: Felix Singer felixsinger@posteo.net Reviewed-on: https://review.coreboot.org/c/coreboot/+/83347 Reviewed-by: Martin L Roth gaumless@gmail.com Reviewed-by: Elyes Haouas ehaouas@noos.fr Tested-by: build bot (Jenkins) no-reply@coreboot.org --- M util/xcompile/xcompile 1 file changed, 33 insertions(+), 0 deletions(-)
Approvals: Martin L Roth: Looks good to me, approved Elyes Haouas: Looks good to me, but someone else must approve build bot (Jenkins): Verified
Objections: Nico Huber: I would prefer that you didn't submit this
diff --git a/util/xcompile/xcompile b/util/xcompile/xcompile index b3012b5..4ead648 100755 --- a/util/xcompile/xcompile +++ b/util/xcompile/xcompile @@ -208,6 +208,39 @@ testcc "$GCC" "$CFLAGS_GCC -Wcalloc-transposed-args" && CFLAGS_GCC="$CFLAGS_GCC -Wcalloc-transposed-args"
+ testcc "$GCC" "$CFLAGS_GCC -Wno-unused-parameter" && + CFLAGS_GCC="$CFLAGS_GCC -Wno-unused-parameter" + + testcc "$GCC" "$CFLAGS_GCC -Wno-sign-compare" && + CFLAGS_GCC="$CFLAGS_GCC -Wno-sign-compare" + + testcc "$GCC" "$CFLAGS_GCC -Wno-empty-body" && + CFLAGS_GCC="$CFLAGS_GCC -Wno-empty-body" + + testcc "$GCC" "$CFLAGS_GCC -Wno-missing-field-initializers" && + CFLAGS_GCC="$CFLAGS_GCC -Wno-missing-field-initializers" + + testcc "$GCC" "$CFLAGS_GCC -Wno-override-init" && + CFLAGS_GCC="$CFLAGS_GCC -Wno-override-init" + + testcc "$GCC" "$CFLAGS_GCC -Wno-ignored-qualifiers" && + CFLAGS_GCC="$CFLAGS_GCC -Wno-ignored-qualifiers" + + testcc "$GCC" "$CFLAGS_GCC -Wno-shift-negative-value" && + CFLAGS_GCC="$CFLAGS_GCC -Wno-shift-negative-value" + + testcc "$GCC" "$CFLAGS_GCC -Wno-unused-but-set-parameter" && + CFLAGS_GCC="$CFLAGS_GCC -Wno-unused-but-set-parameter" + + testcc "$GCC" "$CFLAGS_GCC -Wno-type-limits" && + CFLAGS_GCC="$CFLAGS_GCC -Wno-type-limits" + + testcc "$GCC" "$CFLAGS_GCC -Wno-cast-function-type" && + CFLAGS_GCC="$CFLAGS_GCC -Wno-cast-function-type" + + testcc "$GCC" "$CFLAGS_GCC -Wextra" && + CFLAGS_GCC="$CFLAGS_GCC -Wextra" + case "$architecture" in x86) ;;