[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <08b190b9dabd4625ae3d636b88b43ccb@AcuMS.aculab.com>
Date: Fri, 5 Oct 2018 08:52:02 +0000
From: David Laight <David.Laight@...LAB.COM>
To: 'Arnd Bergmann' <arnd@...db.de>,
Andrew Morton <akpm@...ux-foundation.org>
CC: "linux-renesas-soc@...r.kernel.org"
<linux-renesas-soc@...r.kernel.org>,
Kieran Bingham <kieran.bingham+renesas@...asonboard.com>,
"stable@...r.kernel.org" <stable@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-kbuild@...r.kernel.org" <linux-kbuild@...r.kernel.org>,
"yamada.masahiro@...ionext.com" <yamada.masahiro@...ionext.com>
Subject: RE: [PATCH] kbuild: fix kernel/bounds.c 'W=1' warning
From: Arnd Bergmann
> Sent: 05 October 2018 09:33
>
> Building any configuration with 'make W=1' produces a warning:
>
> kernel/bounds.c:16:6: warnign: no previous prototype for 'foo' [-Wmissing-prototypes]
>
> When also passing -Werror, this prevents us from building any
> other files. Nobody ever calls the function, but we can't make
> it 'static' either since we want the compiler output.
>
> Calling it 'main' instead however avoids the warning, because gcc
> does not insist on having a declaration for main.
Ugg.
main() might be special in other ways too.
It wouldn't surprise me if some linkers don't do special stuff for it.
What is wrong with just putting and extra "void foo(void);" before
the function?
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
Powered by blists - more mailing lists