HAOUAS Elyes has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/39406 )
Change subject: Treewide: Add some gcc's warning options ......................................................................
Treewide: Add some gcc's warning options
Change-Id: I789c8906542c59477b0037d39e7aa4fb2dcf22c0 Signed-off-by: Elyes HAOUAS ehaouas@noos.fr --- M Makefile.inc 1 file changed, 1 insertion(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/06/39406/1
diff --git a/Makefile.inc b/Makefile.inc index f172005..c621abe 100644 --- a/Makefile.inc +++ b/Makefile.inc @@ -421,6 +421,7 @@ CFLAGS_common += -nostdlib -Wall -Wundef -Wstrict-prototypes -Wmissing-prototypes CFLAGS_common += -Wwrite-strings -Wredundant-decls -Wno-trigraphs -Wimplicit-fallthrough CFLAGS_common += -Wstrict-aliasing -Wshadow -Wdate-time -Wtype-limits -Wvla +CFLAGS_common += -Wlogical-op -Wduplicated-branches -Wduplicated-cond -Wdangling-else CFLAGS_common += -fno-common -ffreestanding -fno-builtin -fomit-frame-pointer CFLAGS_common += -ffunction-sections -fdata-sections -fno-pie ifeq ($(CONFIG_COMPILER_GCC),y)
Hello build bot (Jenkins), Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/39406
to look at the new patch set (#2).
Change subject: Treewide: Add some gcc's warning options ......................................................................
Treewide: Add some gcc's warning options
Change-Id: I789c8906542c59477b0037d39e7aa4fb2dcf22c0 Signed-off-by: Elyes HAOUAS ehaouas@noos.fr --- M Makefile.inc 1 file changed, 1 insertion(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/06/39406/2
Martin Roth 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: 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.
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.
Patrick Georgi has submitted this change. ( https://review.coreboot.org/c/coreboot/+/39406 )
Change subject: Treewide: Add some gcc's warning options ......................................................................
Treewide: Add some gcc's warning options
Change-Id: I789c8906542c59477b0037d39e7aa4fb2dcf22c0 Signed-off-by: Elyes HAOUAS ehaouas@noos.fr Reviewed-on: https://review.coreboot.org/c/coreboot/+/39406 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Martin Roth martinroth@google.com --- M Makefile.inc 1 file changed, 1 insertion(+), 0 deletions(-)
Approvals: build bot (Jenkins): Verified Martin Roth: Looks good to me, approved
diff --git a/Makefile.inc b/Makefile.inc index f172005..43b29c7 100644 --- a/Makefile.inc +++ b/Makefile.inc @@ -421,6 +421,7 @@ CFLAGS_common += -nostdlib -Wall -Wundef -Wstrict-prototypes -Wmissing-prototypes CFLAGS_common += -Wwrite-strings -Wredundant-decls -Wno-trigraphs -Wimplicit-fallthrough CFLAGS_common += -Wstrict-aliasing -Wshadow -Wdate-time -Wtype-limits -Wvla +CFLAGS_common += -Wlogical-op -Wduplicated-cond -Wdangling-else CFLAGS_common += -fno-common -ffreestanding -fno-builtin -fomit-frame-pointer CFLAGS_common += -ffunction-sections -fdata-sections -fno-pie ifeq ($(CONFIG_COMPILER_GCC),y)