Skip to contentSkip to conversation

Remove useless EXTRA_CFLAGS

PATCH In review Florian Fainelli 4 participants 8 messages Oct 25, 2007 – Nov 8, 2007 MIPS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Remove useless EXTRA_CFLAGS

Remove the EXTRA_CFLAGS because it is useless (code compiles without warnings).

---

arch/mips/au1000/common/Makefile +0 -2
index 90e2d7a..4c35525 100644
@@ -12,5 +12,3 @@ obj-y += prom.o irq.o puts.o time.o reset.o \
 
 obj-$(CONFIG_KGDB)		+= dbg_io.o
 obj-$(CONFIG_PCI)		+= pci.o
-
-EXTRA_CFLAGS += -Werror
#1 lore raw
Quoted 1 line · Florian Fainelli

Remove the EXTRA_CFLAGS because it is useless (code compiles without warnings).

then where's the harm in leaving it in? It only forces you to think twice (or apply tons of casts) when working with the au1x code.

arch/mips/au1000/common/Makefile obj-y += prom.o irq.o puts.o time.o reset.o \ · line 16

Quoted 3 lines

obj-$(CONFIG_PCI) += pci.o

arch/mips/au1000/common/Makefile +0 -2
-
-EXTRA_CFLAGS += -Werror

MfG,
Manuel Lauss

#2 lore raw

Hi Manuel,

Le jeudi 25 octobre 2007, Manuel Lauss a écrit :

Quoted 2 lines

then where's the harm in leaving it in? It only forces you to think twice (or apply tons of casts) when working with the au1x code.

II could argue the same way, why not :p ?

If your code has warning, you are very likely not to like the compiler stop on it, but rather warn. Also if there are casts or any special conversion, sparse checking will do a better job as far as I can tell.

#3 lore raw
Quoted 5 lines · Florian Fainelli
Quoted 2 lines · Manuel Lauss

then where's the harm in leaving it in? It only forces you to think twice (or apply tons of casts) when working with the au1x code.

II could argue the same way, why not :p ?

Hehe ;)

Quoted 2 lines

If your code has warning, you are very likely not to like the compiler stop on it, but rather warn. Also if there are casts or any special conversion, sparse checking will do a better job as far as I can tell.

I tripped over it once or twice; but in the end I don't really whether this stays or goes (not that it matters anyway)

Thanks,
Manuel Lauss

#4 lore raw
In reply to Florian Fainelli
Quoted 1 line · Florian Fainelli

Remove the EXTRA_CFLAGS because it is useless (code compiles without warnings).

And to ensure it will stay that way I'll keep -Werror. It seems only little PITAs like this keep everybody on their toes :-)

Ralf

#5 lore raw
Quoted 2 lines · Ralf Baechle

And to ensure it will stay that way I'll keep -Werror. It seems only little PITAs like this keep everybody on their toes :-)

Yeah... If only GCC had no bugs and always had a clue of what to warn
about...

Maciej

#6 lore raw
Quoted 5 lines · Maciej W. Rozycki
Quoted 2 lines

And to ensure it will stay that way I'll keep -Werror. It seems only little PITAs like this keep everybody on their toes :-)

Yeah... If only GCC had no bugs and always had a clue of what to warn
about...

The least of all problems.

As of 2.6.20-rc2-git2 we had 137 warnings in MIPS specific code of a total of 218 for the kernel and 44 for modules - that's a insane 52%. And people happily added more crappy code because they didn't not even _notice_ the warnings some of which indeed were bugs.

Compare to 2.6.23 - 13 warnings for MIPS specific code of a total of 48 warnings and another 23 warnings for all the modules. For a codebase which overall had grown by half a million lines between those releases.

Ralf

#7 lore raw
Quoted 4 lines · Ralf Baechle
Quoted 2 lines

Yeah... If only GCC had no bugs and always had a clue of what to warn
about...

The least of all problems.

It depends for whom I suppose. ;-) It is a pain when you have to stretch
your imagination to rewrite a piece of source code GCC warns about unduly and both keep it readable and not make the generated binary worse... Especially where configuration-specific macros are involved.

Quoted 4 lines

As of 2.6.20-rc2-git2 we had 137 warnings in MIPS specific code of a total of 218 for the kernel and 44 for modules - that's a insane 52%. And people happily added more crappy code because they didn't not even _notice_ the warnings some of which indeed were bugs.

Well, adding no warnings should be the rule #1 and I can understand it is
easier for you to enforce it by the means of -Werror. ;-)

Maciej