avoid signed vs unsigned comparison in efi_range_is_wc()
Subsystems (2)
Quoted 4 lines · Jesper
Quoted 1 line
Jesper, are you interested in my stuff
Certainly.
Ok, here is the warning level patch for reference. I'm sending the rest of my stuff to you off-list since it is rather largish and I don't have a working mail client on this machine.
Arnd <><
[PATCH] kbuild: selectable warning levels
This introduces four different levels of compiler warnings to the kernel build environment. The idea is to enable developers to get the extra static code checks that newer gcc versions provide without annoying users with false positives.
I have tested this with gcc versions 2.95 through 4.0 on i386 as well as some cross builds for x86_64, ppc64 and s390. The conditional warning settings are needed to get some of the options that pre-4.0 compilers don't support.
I have not tested this at all with non-GNU compilers, so it probably is not ready for inclusion in -mm at this point.
Makefile +39 -5
@@ -348,8 +348,7 @@ CPPFLAGS := -D__KERNEL__ $(LINUXINCLUDE) -CFLAGS := -Wall -Wstrict-prototypes -Wno-trigraphs \ - -fno-strict-aliasing -fno-common \ +CFLAGS := -fno-strict-aliasing -fno-common \ -ffreestanding AFLAGS := -D__ASSEMBLY__
@@ -533,11 +532,46 @@ NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include) CHECKFLAGS += $(NOSTDINC_FLAGS) +# standard warnings +CWARN_LESS += -Wall -Wstrict-prototypes -Wno-trigraphs # warn about C99 declaration after statement -CFLAGS += $(call cc-option,-Wdeclaration-after-statement,) +CWARN_LESS += $(call cc-option,-Wdeclaration-after-statement,) +CWARN_LESS_COND += +ifdef CONFIG_WARN_ERROR +CWARN_LESS += -Werror +endif +ifdef CONFIG_WARN_LESS +CWARN_LESS += -Wno-deprecated-declarations +CWARN_LESS_COND += -Wno-pointer-sign +CFLAGS += $(CWARN_LESS) $(call cc-option,$(CWARN_LESS_COND),) +endif + +# warn about common problems +CWARN_NORMAL += $(CWARN_LESS) -Winline -Wcast-align -Wundef -Wformat +CWARN_NORMAL += -Wmissing-noreturn +CWARN_NORMAL_COND += $(CWARN_LESS_COND) -Wdisabled-optimization +CWARN_NORMAL_COND += -Wmissing-format-attribute -Wendif-labels +ifdef CONFIG_WARN_NORMAL +CWARN_NORMAL_COND += -Wno-pointer-sign +CFLAGS += $(CWARN_NORMAL) $(call cc-option,$(CWARN_NORMAL_COND),) +endif -# disable pointer signedness warnings in gcc 4.0 -CFLAGS += $(call cc-option,-Wno-pointer-sign,) +# these can get rather noisy +CWARN_MORE += $(CWARN_NORMAL) -Wredundant-decls -Wnested-externs +CWARN_MORE += -Wmissing-prototypes -Wwrite-strings -Wshadow +CWARN_MORE_COND += $(CWARN_NORMAL_COND) +ifdef CONFIG_WARN_MORE +CFLAGS += $(CWARN_MORE) $(call cc-option,$(CWARN_MORE_COND),) +endif + +# these usually don't do any good +CWARN_TOOMUCH += $(CWARN_MORE) -Waggregate-return -Wsign-compare +CWARN_TOOMUCH += -W -Wlarger-than-8192 -Wconversion -Wbad-function-cast +CWARN_TOOMUCH += -Wcast-qual +CWARN_TOOMUCH_COND += $(CWARN_MORE_COND) -Wpadded -Wpacked -Wunreachable-code +ifdef CONFIG_WARN_TOOMUCH +CFLAGS += $(CWARN_TOOMUCH) $(call cc-option,$(CWARN_TOOMUCH_COND),) +endif # Default kernel image to build when no specific target is given. # KBUILD_IMAGE may be overruled on the commandline or
lib/Kconfig.debug +46 -0
49 lines not on this page · raw message
Quoted 11 lines · On 6/17/05, Arnd Bergmann <[email protected]> <[email protected]> wrote:
Quoted 4 lines · Jesper
Quoted 1 line
Jesper, are you interested in my stuff
Certainly.
Ok, here is the warning level patch for reference. I'm sending the rest of my stuff to you off-list since it is rather largish and I don't have a working mail client on this machine.
Thank you. This looks useful.
I also recieved your other patches and I'll see what I can do to double-check them, make sure they apply to current kernels and then start submitting them to the relevant people.
Thanks.
Signature · 3 lines
Jesper Juhl <[email protected]> Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html Plain text mails only, please http://www.expita.com/nomime.html