Skip to contentSkip to conversation

Add -Werror to arch/x86/ files only and fix warnings

git-pull -tip Jaswinder Singh Rajput 3 participants 7 messages Apr 15, 2009

Subsystems (8)
x86 ACPI PCI Crypto API +4 more subsystems
lore
Share & tools
lore
#0 lore raw

Hello Ingo,

As per your suggestion, I added -Werror for x86/files only and fix all remaining warnings on 32-bit and 64-bit defconfig and allnoconfig.

Here is pull request:
The following changes since commit 3965887240cb092f0d568b53165da6a215c7937a:
Ingo Molnar (1):
Merge branch 'linus'

are available in the git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/jaswinder/linux-2.6-tip.git master

Jaswinder Singh Rajput (2):
x86: Adding -Werror to arch/x86/ files only
x86: k8.h convert node_to_k8_nb_misc() from a macro to an inline function

 arch/x86/boot/Makefile                 |    3 +++
 arch/x86/boot/compressed/Makefile      |    3 +++
 arch/x86/crypto/Makefile               |    3 +++
 arch/x86/ia32/Makefile                 |    3 +++
 arch/x86/include/asm/k8.h              |   11 ++++++++---
 arch/x86/kernel/Makefile               |    3 +++
 arch/x86/kernel/acpi/Makefile          |    3 +++
 arch/x86/kernel/acpi/realmode/Makefile |    3 +++
 arch/x86/kernel/apic/Makefile          |    3 +++
 arch/x86/kernel/cpu/Makefile           |    3 +++
 arch/x86/kernel/cpu/cpufreq/Makefile   |    3 +++
 arch/x86/kernel/cpu/mcheck/Makefile    |    3 +++
 arch/x86/kernel/cpu/mtrr/Makefile      |    3 +++
 arch/x86/kvm/Makefile                  |    3 +++
 arch/x86/lguest/Makefile               |    3 +++
 arch/x86/lib/Makefile                  |    3 +++
 arch/x86/math-emu/Makefile             |    3 +++
 arch/x86/mm/Makefile                   |    3 +++
 arch/x86/mm/kmemcheck/Makefile         |    3 +++
 arch/x86/oprofile/Makefile             |    3 +++
 arch/x86/pci/Makefile                  |    3 +++
 arch/x86/power/Makefile                |    3 +++
 arch/x86/vdso/Makefile                 |    4 +++-
 arch/x86/video/Makefile                |    3 +++
 arch/x86/xen/Makefile                  |    5 ++++-
 25 files changed, 81 insertions(+), 5 deletions(-)

Complete diff:

arch/x86/boot/Makefile +3 -0
index 658bc52..aca7d2f 100644
@@ -22,6 +22,9 @@ ROOT_DEV	:= CURRENT
 
 SVGA_MODE	:= -DSVGA_MODE=NORMAL_VGA
 
+# Make all warnings into errors
+ccflags-y := -Werror
+
 targets		:= vmlinux.bin setup.bin setup.elf bzImage
 targets		+= fdimage fdimage144 fdimage288 image.iso mtools.conf
 subdir-		:= compressed
arch/x86/boot/compressed/Makefile +3 -0
index 65551c9..0f04a55 100644
@@ -4,6 +4,9 @@
 # create a compressed vmlinux image from the original vmlinux
 #
 
+# Make all warnings into errors
+ccflags-y := -Werror
+
 targets := vmlinux vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 vmlinux.bin.lzma head_$(BITS).o misc.o piggy.o
 
 KBUILD_CFLAGS := -m$(BITS) -D__KERNEL__ $(LINUX_INCLUDE) -O2
arch/x86/crypto/Makefile +3 -0
index ebe7dee..1b5cbd1 100644
@@ -2,6 +2,9 @@
 # Arch-specific CryptoAPI modules.
 #
 
+# Make all warnings into errors
+ccflags-y := -Werror
+
 obj-$(CONFIG_CRYPTO_AES_586) += aes-i586.o
 obj-$(CONFIG_CRYPTO_TWOFISH_586) += twofish-i586.o
 obj-$(CONFIG_CRYPTO_SALSA20_586) += salsa20-i586.o
arch/x86/ia32/Makefile +3 -0
index 52d0ccf..b9e4eff 100644
@@ -2,6 +2,9 @@
 # Makefile for the ia32 kernel emulation subsystem.
 #
 
+# Make all warnings into errors
+ccflags-y := -Werror
+
 obj-$(CONFIG_IA32_EMULATION) := ia32entry.o sys_ia32.o ia32_signal.o
 
 sysv-$(CONFIG_SYSVIPC) := ipc32.o
arch/x86/include/asm/k8.h +8 -3
index c23b3d1..c2d1f3b 100644
@@ -13,10 +13,15 @@ extern void k8_flush_garts(void);
 extern int k8_scan_nodes(unsigned long start, unsigned long end);
 
 #ifdef CONFIG_K8_NB
-#define node_to_k8_nb_misc(node) \
-	(node < num_k8_northbridges) ? k8_northbridges[node] : NULL
+static inline struct pci_dev *node_to_k8_nb_misc(int node)
+{
+	return (node < num_k8_northbridges) ? k8_northbridges[node] : NULL;
+}
 #else
-#define node_to_k8_nb_misc(node) NULL
+static inline struct pci_dev *node_to_k8_nb_misc(int node)
+{
+	return NULL;
+}
 #endif
 
 
arch/x86/kernel/Makefile +3 -0
index 68a4ff6..d0dfc61 100644
@@ -2,6 +2,9 @@
 # Makefile for the linux kernel.
 #
 
+# Make all warnings into errors
+ccflags-y		:= -Werror
+
 extra-y                := head_$(BITS).o head$(BITS).o head.o init_task.o vmlinux.lds
 
 CPPFLAGS_vmlinux.lds += -U$(UTS_MACHINE)
arch/x86/kernel/acpi/Makefile +3 -0
index fd5ca97..d6f1e61 100644
@@ -1,3 +1,6 @@
+# Make all warnings into errors
+ccflags-y			:= -Werror
+
 subdir-				:= realmode
 
 obj-$(CONFIG_ACPI)		+= boot.o
arch/x86/kernel/acpi/realmode/Makefile +3 -0
index 167bc16..9ac0e29 100644
@@ -6,6 +6,9 @@
 # for more details.
 #
 
+# Make all warnings into errors
+ccflags-y	:= -Werror
+
 always		:= wakeup.bin
 targets		:= wakeup.elf wakeup.lds
 
arch/x86/kernel/apic/Makefile +3 -0
index da7b7b9..d6ee6b7 100644
@@ -2,6 +2,9 @@
 # Makefile for local APIC drivers and for the IO-APIC code
 #
 
+# Make all warnings into errors
+ccflags-y			:= -Werror
+
 obj-$(CONFIG_X86_LOCAL_APIC)	+= apic.o probe_$(BITS).o ipi.o nmi.o
 obj-$(CONFIG_X86_IO_APIC)	+= io_apic.o
 obj-$(CONFIG_SMP)		+= ipi.o
arch/x86/kernel/cpu/Makefile +3 -0
index 3efcb2b..8875b09 100644
@@ -2,6 +2,9 @@
 # Makefile for x86-compatible CPU details, features and quirks
 #
 
+# Make all warnings into errors
+ccflags-y		:= -Werror
+
 # Don't trace early stages of a secondary CPU boot
 ifdef CONFIG_FUNCTION_TRACER
 CFLAGS_REMOVE_common.o = -pg
arch/x86/kernel/cpu/cpufreq/Makefile +3 -0
index 509296d..04f2acf 100644
@@ -2,6 +2,9 @@
 # K8 systems. ACPI is preferred to all other hardware-specific drivers.
 # speedstep-* is preferred over p4-clockmod.
 
+# Make all warnings into errors
+ccflags-y				:= -Werror
+
 obj-$(CONFIG_X86_POWERNOW_K8)		+= powernow-k8.o
 obj-$(CONFIG_X86_ACPI_CPUFREQ)		+= acpi-cpufreq.o
 obj-$(CONFIG_X86_POWERNOW_K6)		+= powernow-k6.o
arch/x86/kernel/cpu/mcheck/Makefile +3 -0
index b2f8982..1c6cd76 100644
@@ -1,3 +1,6 @@
+# Make all warnings into errors
+ccflags-y			:= -Werror
+
 obj-y				=  mce_$(BITS).o therm_throt.o
 
 obj-$(CONFIG_X86_32)		+= k7.o p4.o p5.o p6.o winchip.o
arch/x86/kernel/cpu/mtrr/Makefile +3 -0
index f4361b5..e832c5d 100644
@@ -1,3 +1,6 @@
+# Make all warnings into errors
+ccflags-y	:= -Werror
+
 obj-y		:= main.o if.o generic.o state.o cleanup.o
 obj-$(CONFIG_X86_32) += amd.o cyrix.o centaur.o
 
arch/x86/kvm/Makefile +3 -0
index d3ec292..4034848 100644
@@ -2,6 +2,9 @@
 # Makefile for Kernel-based Virtual Machine module
 #
 
+# Make all warnings into errors
+ccflags-y := -Werror
+
 common-objs = $(addprefix ../../../virt/kvm/, kvm_main.o ioapic.o \
                 coalesced_mmio.o irq_comm.o)
 ifeq ($(CONFIG_KVM_TRACE),y)
arch/x86/lguest/Makefile +3 -0
index 27f0c9e..91e0f58 100644
@@ -1 +1,4 @@
+# Make all warnings into errors
+ccflags-y	:= -Werror
+
 obj-y		:= i386_head.o boot.o
arch/x86/lib/Makefile +3 -0
index 55e11aa..adb8618 100644
@@ -2,6 +2,9 @@
 # Makefile for x86 specific library files.
 #
 
+# Make all warnings into errors
+ccflags-y := -Werror
+
 obj-$(CONFIG_SMP) := msr-on-cpu.o
 
 lib-y := delay.o
arch/x86/math-emu/Makefile +3 -0
index 9b0c63b..13de9a7 100644
@@ -8,6 +8,9 @@ PARANOID = -DPARANOID
 EXTRA_CFLAGS	:= $(PARANOID) $(DEBUG) -fno-builtin $(MATH_EMULATION)
 EXTRA_AFLAGS	:= $(PARANOID)
 
+# Make all warnings into errors
+ccflags-y	:= -Werror
+
 # From 'C' language sources:
 C_OBJS =fpu_entry.o errors.o \
 	fpu_arith.o fpu_aux.o fpu_etc.o fpu_tags.o fpu_trig.o \
arch/x86/mm/Makefile +3 -0
index eefdeee..f7e4e34 100644
@@ -1,3 +1,6 @@
+# Make all warnings into errors
+ccflags-y			:= -Werror
+
 obj-y	:=  init.o init_$(BITS).o fault.o ioremap.o extable.o pageattr.o mmap.o \
 	    pat.o pgtable.o gup.o
 
arch/x86/mm/kmemcheck/Makefile +3 -0
index 520b3bc..08cfc37 100644
@@ -1 +1,4 @@
+# Make all warnings into errors
+ccflags-y := -Werror
+
 obj-y := error.o kmemcheck.o opcode.o pte.o selftest.o shadow.o
arch/x86/oprofile/Makefile +3 -0
index 446902b..30dbda7 100644
@@ -1,3 +1,6 @@
+# Make all warnings into errors
+ccflags-y := -Werror
+
 obj-$(CONFIG_OPROFILE) += oprofile.o
 
 DRIVER_OBJS = $(addprefix ../../../drivers/oprofile/, \
arch/x86/pci/Makefile +3 -0
index d49202e..29a1518 100644
@@ -1,3 +1,6 @@
+# Make all warnings into errors
+ccflags-y			:= -Werror
+
 obj-y				:= i386.o init.o
 
 obj-$(CONFIG_PCI_BIOS)		+= pcbios.o
arch/x86/power/Makefile +3 -0
index 58b32db..581554f 100644
@@ -1,3 +1,6 @@
+# Make all warnings into errors
+ccflags-y		:= -Werror
+
 # __restore_processor_state() restores %gs after S3 resume and so should not
 # itself be stack-protected
 nostackp := $(call cc-option, -fno-stack-protector)
arch/x86/vdso/Makefile +3 -1
index 16a9020..7e9f426 100644
@@ -2,6 +2,9 @@
 # Building vDSO images for x86.
 #
 
+# Make all warnings into errors
+ccflags-y			:= -Werror
+
 VDSO64-$(CONFIG_X86_64)		:= y
 VDSO32-$(CONFIG_X86_32)		:= y
 VDSO32-$(CONFIG_COMPAT)		:= y
@@ -9,7 +12,6 @@ VDSO32-$(CONFIG_COMPAT)		:= y
 vdso-install-$(VDSO64-y)	+= vdso.so
 vdso-install-$(VDSO32-y)	+= $(vdso32-images)
 
-
 # files to link into the vdso
 vobjs-y := vdso-note.o vclock_gettime.o vgetcpu.o vvar.o
 
arch/x86/video/Makefile +3 -0
index 2c447c9..8f703bf 100644
@@ -1 +1,4 @@
+# Make all warnings into errors
+ccflags-y := -Werror
+
 obj-$(CONFIG_FB)               += fbdev.o
arch/x86/xen/Makefile +4 -1
index 3b767d0..266a731 100644
@@ -1,3 +1,6 @@
+# Make all warnings into errors
+ccflags-y := -Werror
+
 ifdef CONFIG_FUNCTION_TRACER
 # Do not profile debug and lowlevel utilities
 CFLAGS_REMOVE_spinlock.o = -pg
@@ -10,4 +13,4 @@ obj-y		:= enlighten.o setup.o multicalls.o mmu.o irq.o \
 			grant-table.o suspend.o
 
 obj-$(CONFIG_SMP)		+= smp.o spinlock.o
-obj-$(CONFIG_XEN_DEBUG_FS)	+= debugfs.o
\ No newline at end of file
+obj-$(CONFIG_XEN_DEBUG_FS)	+= debugfs.o
#1 lore raw
Quoted 52 lines · Jaswinder Singh Rajput

Hello Ingo,

As per your suggestion, I added -Werror for x86/files only and fix all remaining warnings on 32-bit and 64-bit defconfig and allnoconfig.

Here is pull request:
The following changes since commit 3965887240cb092f0d568b53165da6a215c7937a:
Ingo Molnar (1):
Merge branch 'linus'

are available in the git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/jaswinder/linux-2.6-tip.git master

Jaswinder Singh Rajput (2):
x86: Adding -Werror to arch/x86/ files only
x86: k8.h convert node_to_k8_nb_misc() from a macro to an inline function

 arch/x86/boot/Makefile                 |    3 +++
 arch/x86/boot/compressed/Makefile      |    3 +++
 arch/x86/crypto/Makefile               |    3 +++
 arch/x86/ia32/Makefile                 |    3 +++
 arch/x86/include/asm/k8.h              |   11 ++++++++---
 arch/x86/kernel/Makefile               |    3 +++
 arch/x86/kernel/acpi/Makefile          |    3 +++
 arch/x86/kernel/acpi/realmode/Makefile |    3 +++
 arch/x86/kernel/apic/Makefile          |    3 +++
 arch/x86/kernel/cpu/Makefile           |    3 +++
 arch/x86/kernel/cpu/cpufreq/Makefile   |    3 +++
 arch/x86/kernel/cpu/mcheck/Makefile    |    3 +++
 arch/x86/kernel/cpu/mtrr/Makefile      |    3 +++
 arch/x86/kvm/Makefile                  |    3 +++
 arch/x86/lguest/Makefile               |    3 +++
 arch/x86/lib/Makefile                  |    3 +++
 arch/x86/math-emu/Makefile             |    3 +++
 arch/x86/mm/Makefile                   |    3 +++
 arch/x86/mm/kmemcheck/Makefile         |    3 +++
 arch/x86/oprofile/Makefile             |    3 +++
 arch/x86/pci/Makefile                  |    3 +++
 arch/x86/power/Makefile                |    3 +++
 arch/x86/vdso/Makefile                 |    4 +++-
 arch/x86/video/Makefile                |    3 +++
 arch/x86/xen/Makefile                  |    5 ++++-
 25 files changed, 81 insertions(+), 5 deletions(-)

Complete diff:

arch/x86/boot/Makefile +0 -0
index 658bc52..aca7d2f 100644

arch/x86/boot/Makefile ROOT_DEV := CURRENT · line 25

Quoted 4 lines
arch/x86/boot/Makefile +1 -0
@@ -22,6 +22,9 @@ ROOT_DEV	:= CURRENT
 
 SVGA_MODE	:= -DSVGA_MODE=NORMAL_VGA
 
+# Make all warnings into errors

=> 'Turn all warnings into errors'

Quoted 9 lines
arch/x86/boot/Makefile +2 -0
+ccflags-y := -Werror
+
 targets		:= vmlinux.bin setup.bin setup.elf bzImage
 targets		+= fdimage fdimage144 fdimage288 image.iso mtools.conf
 subdir-		:= compressed

arch/x86/mm/Makefile line 5

Quoted 5 lines
arch/x86/mm/Makefile +3 -0
@@ -1,3 +1,6 @@
+# Make all warnings into errors
+ccflags-y			:= -Werror
+
 obj-y	:=  init.o init_$(BITS).o fault.o ioremap.o extable.o pageattr.o mmap.o \
 	    pat.o pgtable.o gup.o

i'd suggest to right-align this obj-y rule as well, to move it in line with the other lines.

Looks good otherwise.

Sam, any second thoughts?

Ingo

#2 lore raw
Quoted 23 lines · Ingo Molnar
Quoted 2 lines

+# Make all warnings into errors

=> 'Turn all warnings into errors'

Quoted 9 lines
(quoted diff) +2 -0
+ccflags-y := -Werror
+
 targets		:= vmlinux.bin setup.bin setup.elf bzImage
 targets		+= fdimage fdimage144 fdimage288 image.iso mtools.conf
 subdir-		:= compressed

arch/x86/mm/Makefile line 5

Quoted 5 lines
arch/x86/mm/Makefile +3 -0
@@ -1,3 +1,6 @@
+# Make all warnings into errors
+ccflags-y			:= -Werror
+
 obj-y	:=  init.o init_$(BITS).o fault.o ioremap.o extable.o pageattr.o mmap.o \
 	    pat.o pgtable.o gup.o

i'd suggest to right-align this obj-y rule as well, to move it in line with the other lines.

Quoted 2 lines

Looks good otherwise.

Ok here is the updated patch:

Subject: [PATCH] x86: Adding -Werror to arch/x86/ files only

Adding -Werror to arch/x86/ files only, to turn all warnings into errors.

---
 arch/x86/boot/Makefile                 |    3 +++
 arch/x86/boot/compressed/Makefile      |    3 +++
 arch/x86/crypto/Makefile               |    3 +++
 arch/x86/ia32/Makefile                 |    3 +++
 arch/x86/kernel/Makefile               |    3 +++
 arch/x86/kernel/acpi/Makefile          |    3 +++
 arch/x86/kernel/acpi/realmode/Makefile |    3 +++
 arch/x86/kernel/apic/Makefile          |    3 +++
 arch/x86/kernel/cpu/Makefile           |    3 +++
 arch/x86/kernel/cpu/cpufreq/Makefile   |    3 +++
 arch/x86/kernel/cpu/mcheck/Makefile    |    3 +++
 arch/x86/kernel/cpu/mtrr/Makefile      |    3 +++
 arch/x86/kvm/Makefile                  |    3 +++
 arch/x86/lguest/Makefile               |    3 +++
 arch/x86/lib/Makefile                  |    3 +++
 arch/x86/math-emu/Makefile             |    3 +++
 arch/x86/mm/Makefile                   |    8 ++++++--
 arch/x86/mm/kmemcheck/Makefile         |    5 ++++-
 arch/x86/oprofile/Makefile             |    3 +++
 arch/x86/pci/Makefile                  |    3 +++
 arch/x86/power/Makefile                |    3 +++
 arch/x86/vdso/Makefile                 |    4 +++-
 arch/x86/video/Makefile                |    5 ++++-
 arch/x86/xen/Makefile                  |    5 ++++-
 24 files changed, 78 insertions(+), 6 deletions(-)
arch/x86/boot/Makefile +3 -0
index 658bc52..fac7bb1 100644
@@ -22,6 +22,9 @@ ROOT_DEV	:= CURRENT
 
 SVGA_MODE	:= -DSVGA_MODE=NORMAL_VGA
 
+# Turn all warnings into errors
+ccflags-y	:= -Werror
+
 targets		:= vmlinux.bin setup.bin setup.elf bzImage
 targets		+= fdimage fdimage144 fdimage288 image.iso mtools.conf
 subdir-		:= compressed
arch/x86/boot/compressed/Makefile +3 -0
index 65551c9..77ebe89 100644
@@ -4,6 +4,9 @@
 # create a compressed vmlinux image from the original vmlinux
 #
 
+# Turn all warnings into errors
+ccflags-y := -Werror
+
 targets := vmlinux vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 vmlinux.bin.lzma head_$(BITS).o misc.o piggy.o
 
 KBUILD_CFLAGS := -m$(BITS) -D__KERNEL__ $(LINUX_INCLUDE) -O2
arch/x86/crypto/Makefile +3 -0
index ebe7dee..fdfb658 100644
@@ -2,6 +2,9 @@
 # Arch-specific CryptoAPI modules.
 #
 
+# Turn all warnings into errors
+ccflags-y := -Werror
+
 obj-$(CONFIG_CRYPTO_AES_586) += aes-i586.o
 obj-$(CONFIG_CRYPTO_TWOFISH_586) += twofish-i586.o
 obj-$(CONFIG_CRYPTO_SALSA20_586) += salsa20-i586.o
arch/x86/ia32/Makefile +3 -0
index 52d0ccf..ca3d20f 100644
@@ -2,6 +2,9 @@
 # Makefile for the ia32 kernel emulation subsystem.
 #
 
+# Turn all warnings into errors
+ccflags-y := -Werror
+
 obj-$(CONFIG_IA32_EMULATION) := ia32entry.o sys_ia32.o ia32_signal.o
 
 sysv-$(CONFIG_SYSVIPC) := ipc32.o
arch/x86/kernel/Makefile +3 -0
index 68a4ff6..244ffe8 100644
@@ -2,6 +2,9 @@
 # Makefile for the linux kernel.
 #
 
+# Turn all warnings into errors
+ccflags-y		:= -Werror
+
 extra-y                := head_$(BITS).o head$(BITS).o head.o init_task.o vmlinux.lds
 
 CPPFLAGS_vmlinux.lds += -U$(UTS_MACHINE)
arch/x86/kernel/acpi/Makefile +3 -0
index fd5ca97..c6169e9 100644
@@ -1,3 +1,6 @@
+# Turn all warnings into errors
+ccflags-y			:= -Werror
+
 subdir-				:= realmode
 
 obj-$(CONFIG_ACPI)		+= boot.o
arch/x86/kernel/acpi/realmode/Makefile +3 -0
index 167bc16..ceafe29 100644
@@ -6,6 +6,9 @@
 # for more details.
 #
 
+# Turn all warnings into errors
+ccflags-y	:= -Werror
+
 always		:= wakeup.bin
 targets		:= wakeup.elf wakeup.lds
 
arch/x86/kernel/apic/Makefile +3 -0
index da7b7b9..3afffc4 100644
@@ -2,6 +2,9 @@
 # Makefile for local APIC drivers and for the IO-APIC code
 #
 
+# Turn all warnings into errors
+ccflags-y			:= -Werror
+
 obj-$(CONFIG_X86_LOCAL_APIC)	+= apic.o probe_$(BITS).o ipi.o nmi.o
 obj-$(CONFIG_X86_IO_APIC)	+= io_apic.o
 obj-$(CONFIG_SMP)		+= ipi.o
arch/x86/kernel/cpu/Makefile +3 -0
index 3efcb2b..a544d53 100644
@@ -2,6 +2,9 @@
 # Makefile for x86-compatible CPU details, features and quirks
 #
 
+# Turn all warnings into errors
+ccflags-y		:= -Werror
+
 # Don't trace early stages of a secondary CPU boot
 ifdef CONFIG_FUNCTION_TRACER
 CFLAGS_REMOVE_common.o = -pg
arch/x86/kernel/cpu/cpufreq/Makefile +3 -0
index 509296d..38ecbea 100644
@@ -2,6 +2,9 @@
 # K8 systems. ACPI is preferred to all other hardware-specific drivers.
 # speedstep-* is preferred over p4-clockmod.
 
+# Turn all warnings into errors
+ccflags-y				:= -Werror
+
 obj-$(CONFIG_X86_POWERNOW_K8)		+= powernow-k8.o
 obj-$(CONFIG_X86_ACPI_CPUFREQ)		+= acpi-cpufreq.o
 obj-$(CONFIG_X86_POWERNOW_K6)		+= powernow-k6.o
arch/x86/kernel/cpu/mcheck/Makefile +3 -0
index b2f8982..9e126c8 100644
@@ -1,3 +1,6 @@
+# Turn all warnings into errors
+ccflags-y			:= -Werror
+
 obj-y				=  mce_$(BITS).o therm_throt.o
 
 obj-$(CONFIG_X86_32)		+= k7.o p4.o p5.o p6.o winchip.o
arch/x86/kernel/cpu/mtrr/Makefile +3 -0
index f4361b5..9f998b2 100644
@@ -1,3 +1,6 @@
+# Turn all warnings into errors
+ccflags-y	:= -Werror
+
 obj-y		:= main.o if.o generic.o state.o cleanup.o
 obj-$(CONFIG_X86_32) += amd.o cyrix.o centaur.o
 
arch/x86/kvm/Makefile +3 -0
index d3ec292..306c998 100644
@@ -2,6 +2,9 @@
 # Makefile for Kernel-based Virtual Machine module
 #
 
+# Turn all warnings into errors
+ccflags-y := -Werror
+
 common-objs = $(addprefix ../../../virt/kvm/, kvm_main.o ioapic.o \
                 coalesced_mmio.o irq_comm.o)
 ifeq ($(CONFIG_KVM_TRACE),y)
arch/x86/lguest/Makefile +3 -0
index 27f0c9e..8b56b5b 100644
@@ -1 +1,4 @@
+# Turn all warnings into errors
+ccflags-y	:= -Werror
+
 obj-y		:= i386_head.o boot.o
arch/x86/lib/Makefile +3 -0
index 55e11aa..127cbb9 100644
@@ -2,6 +2,9 @@
 # Makefile for x86 specific library files.
 #
 
+# Turn all warnings into errors
+ccflags-y := -Werror
+
 obj-$(CONFIG_SMP) := msr-on-cpu.o
 
 lib-y := delay.o
arch/x86/math-emu/Makefile +3 -0
index 9b0c63b..a59de4b 100644
@@ -8,6 +8,9 @@ PARANOID = -DPARANOID
 EXTRA_CFLAGS	:= $(PARANOID) $(DEBUG) -fno-builtin $(MATH_EMULATION)
 EXTRA_AFLAGS	:= $(PARANOID)
 
+# Turn all warnings into errors
+ccflags-y	:= -Werror
+
 # From 'C' language sources:
 C_OBJS =fpu_entry.o errors.o \
 	fpu_arith.o fpu_aux.o fpu_etc.o fpu_tags.o fpu_trig.o \
arch/x86/mm/Makefile +6 -2
index eefdeee..2229b78 100644
@@ -1,5 +1,9 @@
-obj-y	:=  init.o init_$(BITS).o fault.o ioremap.o extable.o pageattr.o mmap.o \
-	    pat.o pgtable.o gup.o
+# Turn all warnings into errors
+ccflags-y			:= -Werror
+
+obj-y				:=  init.o init_$(BITS).o fault.o ioremap.o \
+				    extable.o pageattr.o mmap.o pat.o \
+				    pgtable.o gup.o
 
 obj-$(CONFIG_SMP)		+= tlb.o
 
arch/x86/mm/kmemcheck/Makefile +4 -1
index 520b3bc..6918162 100644
@@ -1 +1,4 @@
-obj-y := error.o kmemcheck.o opcode.o pte.o selftest.o shadow.o
+# Turn all warnings into errors
+ccflags-y	:= -Werror
+
+obj-y		:= error.o kmemcheck.o opcode.o pte.o selftest.o shadow.o
arch/x86/oprofile/Makefile +3 -0
index 446902b..5296402 100644
@@ -1,3 +1,6 @@
+# Turn all warnings into errors
+ccflags-y := -Werror
+
 obj-$(CONFIG_OPROFILE) += oprofile.o
 
 DRIVER_OBJS = $(addprefix ../../../drivers/oprofile/, \
arch/x86/pci/Makefile +3 -0
index d49202e..2eed81f 100644
@@ -1,3 +1,6 @@
+# Turn all warnings into errors
+ccflags-y			:= -Werror
+
 obj-y				:= i386.o init.o
 
 obj-$(CONFIG_PCI_BIOS)		+= pcbios.o
arch/x86/power/Makefile +3 -0
index 58b32db..0cc8d49 100644
@@ -1,3 +1,6 @@
+# Turn all warnings into errors
+ccflags-y		:= -Werror
+
 # __restore_processor_state() restores %gs after S3 resume and so should not
 # itself be stack-protected
 nostackp := $(call cc-option, -fno-stack-protector)
arch/x86/vdso/Makefile +3 -1
index 16a9020..8afd392 100644
@@ -2,6 +2,9 @@
 # Building vDSO images for x86.
 #
 
+# Turn all warnings into errors
+ccflags-y			:= -Werror
+
 VDSO64-$(CONFIG_X86_64)		:= y
 VDSO32-$(CONFIG_X86_32)		:= y
 VDSO32-$(CONFIG_COMPAT)		:= y
@@ -9,7 +12,6 @@ VDSO32-$(CONFIG_COMPAT)		:= y
 vdso-install-$(VDSO64-y)	+= vdso.so
 vdso-install-$(VDSO32-y)	+= $(vdso32-images)
 
-
 # files to link into the vdso
 vobjs-y := vdso-note.o vclock_gettime.o vgetcpu.o vvar.o
 
arch/x86/video/Makefile +4 -1
index 2c447c9..40a57ad 100644
@@ -1 +1,4 @@
-obj-$(CONFIG_FB)               += fbdev.o
+# Turn all warnings into errors
+ccflags-y		:= -Werror
+
+obj-$(CONFIG_FB)	+= fbdev.o
arch/x86/xen/Makefile +4 -1
index 3b767d0..bba4868 100644
@@ -1,3 +1,6 @@
+# Turn all warnings into errors
+ccflags-y := -Werror
+
 ifdef CONFIG_FUNCTION_TRACER
 # Do not profile debug and lowlevel utilities
 CFLAGS_REMOVE_spinlock.o = -pg
@@ -10,4 +13,4 @@ obj-y		:= enlighten.o setup.o multicalls.o mmu.o irq.o \
 			grant-table.o suspend.o
 
 obj-$(CONFIG_SMP)		+= smp.o spinlock.o
-obj-$(CONFIG_XEN_DEBUG_FS)	+= debugfs.o
\ No newline at end of file
+obj-$(CONFIG_XEN_DEBUG_FS)	+= debugfs.o
Signature · 1 line
1.6.0.6
#3 lore raw
Quoted 24 lines · Jaswinder Singh Rajput
Quoted 23 lines · Ingo Molnar
Quoted 2 lines

+# Make all warnings into errors

=> 'Turn all warnings into errors'

Quoted 9 lines
(quoted diff) +2 -0
+ccflags-y := -Werror
+
 targets		:= vmlinux.bin setup.bin setup.elf bzImage
 targets		+= fdimage fdimage144 fdimage288 image.iso mtools.conf
 subdir-		:= compressed

arch/x86/mm/Makefile line 5

Quoted 5 lines
arch/x86/mm/Makefile +3 -0
@@ -1,3 +1,6 @@
+# Make all warnings into errors
+ccflags-y			:= -Werror
+
 obj-y	:=  init.o init_$(BITS).o fault.o ioremap.o extable.o pageattr.o mmap.o \
 	    pat.o pgtable.o gup.o

i'd suggest to right-align this obj-y rule as well, to move it in line with the other lines.

Quoted 8 lines
Quoted 2 lines

Looks good otherwise.

Ok here is the updated patch:

Subject: [PATCH] x86: Adding -Werror to arch/x86/ files only

Adding -Werror to arch/x86/ files only, to turn all warnings into errors.

Here is V2 of this patch where we can enable/disable this option:

Subject: [PATCH-tip] x86: Adding -Werror to arch/x86/ files only for !CONFIG_ALLOW_X86_WARNINGS

Adding -Werror to arch/x86/ files only, to turn all warnings into errors.

---
 arch/x86/Kconfig                       |    9 +++++++++
 arch/x86/boot/Makefile                 |    5 +++++
 arch/x86/boot/compressed/Makefile      |    5 +++++
 arch/x86/crypto/Makefile               |    5 +++++
 arch/x86/ia32/Makefile                 |    5 +++++
 arch/x86/kernel/Makefile               |    5 +++++
 arch/x86/kernel/acpi/Makefile          |    5 +++++
 arch/x86/kernel/acpi/realmode/Makefile |    5 +++++
 arch/x86/kernel/apic/Makefile          |    5 +++++
 arch/x86/kernel/cpu/Makefile           |    5 +++++
 arch/x86/kernel/cpu/cpufreq/Makefile   |    5 +++++
 arch/x86/kernel/cpu/mcheck/Makefile    |    5 +++++
 arch/x86/kernel/cpu/mtrr/Makefile      |    5 +++++
 arch/x86/kvm/Makefile                  |    5 +++++
 arch/x86/lguest/Makefile               |    5 +++++
 arch/x86/lib/Makefile                  |    5 +++++
 arch/x86/math-emu/Makefile             |    5 +++++
 arch/x86/mm/Makefile                   |   10 ++++++++--
 arch/x86/mm/kmemcheck/Makefile         |    7 ++++++-
 arch/x86/oprofile/Makefile             |    5 +++++
 arch/x86/pci/Makefile                  |    5 +++++
 arch/x86/power/Makefile                |    5 +++++
 arch/x86/vdso/Makefile                 |    6 +++++-
 arch/x86/video/Makefile                |    7 ++++++-
 arch/x86/xen/Makefile                  |    7 ++++++-
 25 files changed, 135 insertions(+), 6 deletions(-)
arch/x86/Kconfig +9 -0
index 2560fff..f53e335 100644
@@ -171,6 +171,15 @@ config ARCH_SUPPORTS_OPTIMIZED_INLINING
 config ARCH_SUPPORTS_DEBUG_PAGEALLOC
 	def_bool y
 
+config ALLOW_X86_WARNINGS
+	bool "Continue building x86 despite compiler warnings"
+	default n
+	depends on ALLOW_WARNINGS
+	depends on DEBUG_KERNEL
+	help
+	  By enabling this option you will disable -Werror on building
+	  x86 C files only.
+
 # Use the generic interrupt handling code in kernel/irq/:
 config GENERIC_HARDIRQS
 	bool
arch/x86/boot/Makefile +5 -0
index 658bc52..95f9cfd 100644
@@ -22,6 +22,11 @@ ROOT_DEV	:= CURRENT
 
 SVGA_MODE	:= -DSVGA_MODE=NORMAL_VGA
 
+# Turn all warnings into errors
+ifndef CONFIG_ALLOW_X86_WARNINGS
+ccflags-y	:= -Werror
+endif
+
 targets		:= vmlinux.bin setup.bin setup.elf bzImage
 targets		+= fdimage fdimage144 fdimage288 image.iso mtools.conf
 subdir-		:= compressed
arch/x86/boot/compressed/Makefile +5 -0
index 65551c9..2e84872 100644
@@ -4,6 +4,11 @@
 # create a compressed vmlinux image from the original vmlinux
 #
 
+# Turn all warnings into errors
+ifndef CONFIG_ALLOW_X86_WARNINGS
+ccflags-y := -Werror
+endif
+
 targets := vmlinux vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 vmlinux.bin.lzma head_$(BITS).o misc.o piggy.o
 
 KBUILD_CFLAGS := -m$(BITS) -D__KERNEL__ $(LINUX_INCLUDE) -O2
arch/x86/crypto/Makefile +5 -0
index ebe7dee..e12163b 100644
@@ -2,6 +2,11 @@
 # Arch-specific CryptoAPI modules.
 #
 
+# Turn all warnings into errors
+ifndef CONFIG_ALLOW_X86_WARNINGS
+ccflags-y := -Werror
+endif
+
 obj-$(CONFIG_CRYPTO_AES_586) += aes-i586.o
 obj-$(CONFIG_CRYPTO_TWOFISH_586) += twofish-i586.o
 obj-$(CONFIG_CRYPTO_SALSA20_586) += salsa20-i586.o
arch/x86/ia32/Makefile +5 -0
index 52d0ccf..87af2bc 100644
@@ -2,6 +2,11 @@
 # Makefile for the ia32 kernel emulation subsystem.
 #
 
+# Turn all warnings into errors
+ifndef CONFIG_ALLOW_X86_WARNINGS
+ccflags-y := -Werror
+endif
+
 obj-$(CONFIG_IA32_EMULATION) := ia32entry.o sys_ia32.o ia32_signal.o
 
 sysv-$(CONFIG_SYSVIPC) := ipc32.o
arch/x86/kernel/Makefile +5 -0
index 68a4ff6..f3bbc79 100644
@@ -2,6 +2,11 @@
 # Makefile for the linux kernel.
 #
 
+# Turn all warnings into errors
+ifndef CONFIG_ALLOW_X86_WARNINGS
+ccflags-y		:= -Werror
+endif
+
 extra-y                := head_$(BITS).o head$(BITS).o head.o init_task.o vmlinux.lds
 
 CPPFLAGS_vmlinux.lds += -U$(UTS_MACHINE)
arch/x86/kernel/acpi/Makefile +5 -0
index fd5ca97..43a4559 100644
@@ -1,3 +1,8 @@
+# Turn all warnings into errors
+ifndef CONFIG_ALLOW_X86_WARNINGS
+ccflags-y			:= -Werror
+endif
+
 subdir-				:= realmode
 
 obj-$(CONFIG_ACPI)		+= boot.o
arch/x86/kernel/acpi/realmode/Makefile +5 -0
index 167bc16..e053670 100644
@@ -6,6 +6,11 @@
 # for more details.
 #
 
+# Turn all warnings into errors
+ifndef CONFIG_ALLOW_X86_WARNINGS
+ccflags-y	:= -Werror
+endif
+
 always		:= wakeup.bin
 targets		:= wakeup.elf wakeup.lds
 
arch/x86/kernel/apic/Makefile +5 -0
index da7b7b9..3d06de5 100644
@@ -2,6 +2,11 @@
 # Makefile for local APIC drivers and for the IO-APIC code
 #
 
+# Turn all warnings into errors
+ifndef CONFIG_ALLOW_X86_WARNINGS
+ccflags-y			:= -Werror
+endif
+
 obj-$(CONFIG_X86_LOCAL_APIC)	+= apic.o probe_$(BITS).o ipi.o nmi.o
 obj-$(CONFIG_X86_IO_APIC)	+= io_apic.o
 obj-$(CONFIG_SMP)		+= ipi.o
arch/x86/kernel/cpu/Makefile +5 -0
index 3efcb2b..b010843 100644
@@ -2,6 +2,11 @@
 # Makefile for x86-compatible CPU details, features and quirks
 #
 
+# Turn all warnings into errors
+ifndef CONFIG_ALLOW_X86_WARNINGS
+ccflags-y		:= -Werror
+endif
+
 # Don't trace early stages of a secondary CPU boot
 ifdef CONFIG_FUNCTION_TRACER
 CFLAGS_REMOVE_common.o = -pg
arch/x86/kernel/cpu/cpufreq/Makefile +5 -0
index 509296d..986c7db 100644
@@ -2,6 +2,11 @@
 # K8 systems. ACPI is preferred to all other hardware-specific drivers.
 # speedstep-* is preferred over p4-clockmod.
 
+# Turn all warnings into errors
+ifndef CONFIG_ALLOW_X86_WARNINGS
+ccflags-y				:= -Werror
+endif
+
 obj-$(CONFIG_X86_POWERNOW_K8)		+= powernow-k8.o
 obj-$(CONFIG_X86_ACPI_CPUFREQ)		+= acpi-cpufreq.o
 obj-$(CONFIG_X86_POWERNOW_K6)		+= powernow-k6.o
arch/x86/kernel/cpu/mcheck/Makefile +5 -0
index b2f8982..e3b1755 100644
@@ -1,3 +1,8 @@
+# Turn all warnings into errors
+ifndef CONFIG_ALLOW_X86_WARNINGS
+ccflags-y			:= -Werror
+endif
+
 obj-y				=  mce_$(BITS).o therm_throt.o
 
 obj-$(CONFIG_X86_32)		+= k7.o p4.o p5.o p6.o winchip.o
arch/x86/kernel/cpu/mtrr/Makefile +5 -0
index f4361b5..29d2d03 100644
@@ -1,3 +1,8 @@
+# Turn all warnings into errors
+ifndef CONFIG_ALLOW_X86_WARNINGS
+ccflags-y	:= -Werror
+endif
+
 obj-y		:= main.o if.o generic.o state.o cleanup.o
 obj-$(CONFIG_X86_32) += amd.o cyrix.o centaur.o
 
arch/x86/kvm/Makefile +5 -0
index d3ec292..cc975ed 100644
@@ -2,6 +2,11 @@
 # Makefile for Kernel-based Virtual Machine module
 #
 
+# Turn all warnings into errors
+ifndef CONFIG_ALLOW_X86_WARNINGS
+ccflags-y := -Werror
+endif
+
 common-objs = $(addprefix ../../../virt/kvm/, kvm_main.o ioapic.o \
                 coalesced_mmio.o irq_comm.o)
 ifeq ($(CONFIG_KVM_TRACE),y)
arch/x86/lguest/Makefile +5 -0
index 27f0c9e..7f99e43 100644
@@ -1 +1,6 @@
+# Turn all warnings into errors
+ifndef CONFIG_ALLOW_X86_WARNINGS
+ccflags-y	:= -Werror
+endif
+
 obj-y		:= i386_head.o boot.o
arch/x86/lib/Makefile +5 -0
index 55e11aa..ffa4fe8 100644
@@ -2,6 +2,11 @@
 # Makefile for x86 specific library files.
 #
 
+# Turn all warnings into errors
+ifndef CONFIG_ALLOW_X86_WARNINGS
+ccflags-y := -Werror
+endif
+
 obj-$(CONFIG_SMP) := msr-on-cpu.o
 
 lib-y := delay.o
arch/x86/math-emu/Makefile +5 -0
index 9b0c63b..85278e8 100644
@@ -8,6 +8,11 @@ PARANOID = -DPARANOID
 EXTRA_CFLAGS	:= $(PARANOID) $(DEBUG) -fno-builtin $(MATH_EMULATION)
 EXTRA_AFLAGS	:= $(PARANOID)
 
+# Turn all warnings into errors
+ifndef CONFIG_ALLOW_X86_WARNINGS
+ccflags-y	:= -Werror
+endif
+
 # From 'C' language sources:
 C_OBJS =fpu_entry.o errors.o \
 	fpu_arith.o fpu_aux.o fpu_etc.o fpu_tags.o fpu_trig.o \
arch/x86/mm/Makefile +8 -2
index eefdeee..0ef8c18 100644
@@ -1,5 +1,11 @@
-obj-y	:=  init.o init_$(BITS).o fault.o ioremap.o extable.o pageattr.o mmap.o \
-	    pat.o pgtable.o gup.o
+# Turn all warnings into errors
+ifndef CONFIG_ALLOW_X86_WARNINGS
+ccflags-y			:= -Werror
+endif
+
+obj-y				:=  init.o init_$(BITS).o fault.o ioremap.o \
+				    extable.o pageattr.o mmap.o pat.o \
+				    pgtable.o gup.o
 
 obj-$(CONFIG_SMP)		+= tlb.o
 
arch/x86/mm/kmemcheck/Makefile +6 -1
index 520b3bc..e789844 100644
@@ -1 +1,6 @@
-obj-y := error.o kmemcheck.o opcode.o pte.o selftest.o shadow.o
+# Turn all warnings into errors
+ifndef CONFIG_ALLOW_X86_WARNINGS
+ccflags-y	:= -Werror
+endif
+
+obj-y		:= error.o kmemcheck.o opcode.o pte.o selftest.o shadow.o
arch/x86/oprofile/Makefile +5 -0
index 446902b..07a1689 100644
@@ -1,3 +1,8 @@
+# Turn all warnings into errors
+ifndef CONFIG_ALLOW_X86_WARNINGS
+ccflags-y := -Werror
+endif
+
 obj-$(CONFIG_OPROFILE) += oprofile.o
 
 DRIVER_OBJS = $(addprefix ../../../drivers/oprofile/, \
arch/x86/pci/Makefile +5 -0
index d49202e..8b8920d 100644
@@ -1,3 +1,8 @@
+# Turn all warnings into errors
+ifndef CONFIG_ALLOW_X86_WARNINGS
+ccflags-y			:= -Werror
+endif
+
 obj-y				:= i386.o init.o
 
 obj-$(CONFIG_PCI_BIOS)		+= pcbios.o
arch/x86/power/Makefile +5 -0
index 58b32db..0ebd3f7 100644
@@ -1,3 +1,8 @@
+# Turn all warnings into errors
+ifndef CONFIG_ALLOW_X86_WARNINGS
+ccflags-y		:= -Werror
+endif
+
 # __restore_processor_state() restores %gs after S3 resume and so should not
 # itself be stack-protected
 nostackp := $(call cc-option, -fno-stack-protector)
arch/x86/vdso/Makefile +5 -1
index 16a9020..c5c47b4 100644
@@ -2,6 +2,11 @@
 # Building vDSO images for x86.
 #
 
+# Turn all warnings into errors
+ifndef CONFIG_ALLOW_X86_WARNINGS
+ccflags-y			:= -Werror
+endif
+
 VDSO64-$(CONFIG_X86_64)		:= y
 VDSO32-$(CONFIG_X86_32)		:= y
 VDSO32-$(CONFIG_COMPAT)		:= y
@@ -9,7 +14,6 @@ VDSO32-$(CONFIG_COMPAT)		:= y
 vdso-install-$(VDSO64-y)	+= vdso.so
 vdso-install-$(VDSO32-y)	+= $(vdso32-images)
 
-
 # files to link into the vdso
 vobjs-y := vdso-note.o vclock_gettime.o vgetcpu.o vvar.o
 
arch/x86/video/Makefile +6 -1
index 2c447c9..16aafab 100644
@@ -1 +1,6 @@
-obj-$(CONFIG_FB)               += fbdev.o
+# Turn all warnings into errors
+ifndef CONFIG_ALLOW_X86_WARNINGS
+ccflags-y		:= -Werror
+endif
+
+obj-$(CONFIG_FB)	+= fbdev.o
arch/x86/xen/Makefile +6 -1
index 3b767d0..bb22068 100644
@@ -1,3 +1,8 @@
+# Turn all warnings into errors
+ifndef CONFIG_ALLOW_X86_WARNINGS
+ccflags-y := -Werror
+endif
+
 ifdef CONFIG_FUNCTION_TRACER
 # Do not profile debug and lowlevel utilities
 CFLAGS_REMOVE_spinlock.o = -pg
@@ -10,4 +15,4 @@ obj-y		:= enlighten.o setup.o multicalls.o mmu.o irq.o \
 			grant-table.o suspend.o
 
 obj-$(CONFIG_SMP)		+= smp.o spinlock.o
-obj-$(CONFIG_XEN_DEBUG_FS)	+= debugfs.o
\ No newline at end of file
+obj-$(CONFIG_XEN_DEBUG_FS)	+= debugfs.o
Signature · 1 line
1.6.0.6
#4 lore raw

arch/x86/Kconfig config ARCH_SUPPORTS_OPTIMIZED_INLINING · line 181

Quoted 8 lines · Jaswinder Singh Rajput
arch/x86/Kconfig +8 -0
+config ALLOW_X86_WARNINGS
+	bool "Continue building x86 despite compiler warnings"
+	default n
+	depends on ALLOW_WARNINGS
+	depends on DEBUG_KERNEL
+	help
+	  By enabling this option you will disable -Werror on building
+	  x86 C files only.

no, it should be something like this:

config ALLOW_X86_WARNINGS
bool "Continue building x86 despite compiler warnings" if DEBUG_KERNEL default y
help
By disabling this option you will enable -Werror builds:
i.e. any compiler warning will generate a build failure. (On arch/x86 files only)

Disabe this only if you have a reasonably recent compiler that does not emit bogus warnings and if you want to help with fixing warnings. Also choose this if you are an x86 developer trying to make sure that the patches you submit build warning-free. (The rest of the kernel can emit lots of build warnings - so your own warnings might be easy to miss.)

Choose Y if unsure.

Note the differences: this will be properly kept 'Y' in most situations (allyes, allmod, allno). Also note the explicit explanation in the help text.

Ingo

#5 lore raw
In reply to Jaswinder Singh Rajput
Quoted 1 line · On Wed, 15 Apr 2009 16:34:18 +0530 Jaswinder Singh Rajput…

I added -Werror for x86/files only

yikes.

Not only does this need to be tested for all configs, it also need to be tested for all approved gcc versions.

For example, one of my compilers always spews warnings from x86 because it has the "foo(&bar) doesn't initialise bar" stupidity.

And there will be other gcc inconsitencies, for sure.

Quoted 1 line

Subject: [PATCH-tip] x86: Adding -Werror to arch/x86/ files only for !CONFIG_ALLOW_X86_WARNINGS

whew, that sounds better.

#6 lore raw
Quoted 7 lines · Andrew Morton
Quoted 1 line · On Wed, 15 Apr 2009 16:34:18 +0530 Jaswinder Singh Rajput…

I added -Werror for x86/files only

yikes.

Quoted 7 lines

Not only does this need to be tested for all configs, it also need to be tested for all approved gcc versions.

For example, one of my compilers always spews warnings from x86 because it has the "foo(&bar) doesn't initialise bar" stupidity.

And there will be other gcc inconsitencies, for sure.

Yes.

Quoted 4 lines
Quoted 2 lines

Subject: [PATCH-tip] x86: Adding -Werror to arch/x86/ files only for !CONFIG_ALLOW_X86_WARNINGS

whew, that sounds better.

Yes, as requested by an equally worried x86 maintainer ;-)

Ingo