Patchwork [2/2] MIPS: bcm63xx: kbuild: remove -Werror

login
register
mail settings
Submitter Artem Bityutskiy
Date April 27, 2012, 1:48 p.m.
Message ID <1335534510-12573-2-git-send-email-dedekind1@gmail.com>
Download mbox | patch
Permalink /patch/155481/
State New
Headers show

Comments

Artem Bityutskiy - April 27, 2012, 1:48 p.m.
From: Artem Bityutskiy <Artem.Bityutskiy@linux.intel.com>

I cannot build bcm963xx with the standard Kbuild W=1 switch:

arch/mips/bcm63xx/boards/board_bcm963xx.c: At top level:
arch/mips/bcm63xx/boards/board_bcm963xx.c:647:5: error: no previous prototype for 'bcm63xx_get_fallback_sprom' [-Werror=missing-prototypes]
cc1: all warnings being treated as errors

This patch removes the gcc switch to make W=1 work. Mips is the only
architecture I know which does not build with W=1 and this upsets my aiaiai
scripts. And in general, you never know which warnings newer versions of gcc
will start emiting so having -Werror by default is not the best idea.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
---
 arch/mips/bcm63xx/boards/Makefile |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)
Maciej W. Rozycki - May 6, 2012, 7:06 a.m.
On Fri, 27 Apr 2012, Artem Bityutskiy wrote:

> From: Artem Bityutskiy <Artem.Bityutskiy@linux.intel.com>
> 
> I cannot build bcm963xx with the standard Kbuild W=1 switch:
> 
> arch/mips/bcm63xx/boards/board_bcm963xx.c: At top level:
> arch/mips/bcm63xx/boards/board_bcm963xx.c:647:5: error: no previous prototype for 'bcm63xx_get_fallback_sprom' [-Werror=missing-prototypes]
> cc1: all warnings being treated as errors
> 
> This patch removes the gcc switch to make W=1 work. Mips is the only
> architecture I know which does not build with W=1 and this upsets my aiaiai
> scripts. And in general, you never know which warnings newer versions of gcc
> will start emiting so having -Werror by default is not the best idea.

 If the function has no prototype, then it cannot be reasonably used from 
outside -- perhaps you meant to mark it static instead?

  Maciej
Artem Bityutskiy - May 6, 2012, 7:36 a.m.
On Sun, 2012-05-06 at 08:06 +0100, Maciej W. Rozycki wrote:
> On Fri, 27 Apr 2012, Artem Bityutskiy wrote:
> 
> > From: Artem Bityutskiy <Artem.Bityutskiy@linux.intel.com>
> > 
> > I cannot build bcm963xx with the standard Kbuild W=1 switch:
> > 
> > arch/mips/bcm63xx/boards/board_bcm963xx.c: At top level:
> > arch/mips/bcm63xx/boards/board_bcm963xx.c:647:5: error: no previous prototype for 'bcm63xx_get_fallback_sprom' [-Werror=missing-prototypes]
> > cc1: all warnings being treated as errors
> > 
> > This patch removes the gcc switch to make W=1 work. Mips is the only
> > architecture I know which does not build with W=1 and this upsets my aiaiai
> > scripts. And in general, you never know which warnings newer versions of gcc
> > will start emiting so having -Werror by default is not the best idea.
> 
>  If the function has no prototype, then it cannot be reasonably used from 
> outside -- perhaps you meant to mark it static instead?

No, I meant what I meant - MIPS does not build with W=1.
Ralf Baechle - May 21, 2012, 6:15 p.m.
On Fri, Apr 27, 2012 at 04:48:30PM +0300, Artem Bityutskiy wrote:

> From: Artem Bityutskiy <Artem.Bityutskiy@linux.intel.com>
> 
> I cannot build bcm963xx with the standard Kbuild W=1 switch:
> 
> arch/mips/bcm63xx/boards/board_bcm963xx.c: At top level:
> arch/mips/bcm63xx/boards/board_bcm963xx.c:647:5: error: no previous prototype for 'bcm63xx_get_fallback_sprom' [-Werror=missing-prototypes]
> cc1: all warnings being treated as errors
> 
> This patch removes the gcc switch to make W=1 work. Mips is the only
> architecture I know which does not build with W=1 and this upsets my aiaiai
> scripts. And in general, you never know which warnings newer versions of gcc
> will start emiting so having -Werror by default is not the best idea.
> 
> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
> ---
>  arch/mips/bcm63xx/boards/Makefile |    2 --
>  1 files changed, 0 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/mips/bcm63xx/boards/Makefile b/arch/mips/bcm63xx/boards/Makefile
> index 9f64fb4..af07c1a 100644
> --- a/arch/mips/bcm63xx/boards/Makefile
> +++ b/arch/mips/bcm63xx/boards/Makefile
> @@ -1,3 +1 @@
>  obj-$(CONFIG_BOARD_BCM963XX)		+= board_bcm963xx.o
> -
> -ccflags-y := -Werror

There's been a whole bunch of other -Werrors below arch/mips some of
which even were combined with -Wall.  I removed all off them except the
central -Werror in arch/mips/Kbuild.  I'm pondering a better solution
for that one now.

  Ralf

Patch

diff --git a/arch/mips/bcm63xx/boards/Makefile b/arch/mips/bcm63xx/boards/Makefile
index 9f64fb4..af07c1a 100644
--- a/arch/mips/bcm63xx/boards/Makefile
+++ b/arch/mips/bcm63xx/boards/Makefile
@@ -1,3 +1 @@ 
 obj-$(CONFIG_BOARD_BCM963XX)		+= board_bcm963xx.o
-
-ccflags-y := -Werror