[PATCH] kbuild: add -Werror=implicit-function-declaration
Simon Glass
sjg at chromium.org
Fri May 8 03:36:46 CEST 2020
Hi Masahiro,
On Thu, 7 May 2020 at 06:21, Masahiro Yamada
<yamada.masahiro at socionext.com> wrote:
>
> Add -Werror=implicit-function-declaration as Linux does.
>
> If you do not check the prototype, it may go wrong run-time.
> It is better to break the build, and require to include correct
> headers.
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro at socionext.com>
> ---
>
> Makefile | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
NAK
We already get a warning in this situation. This makes it painful for
development since things that should be warnings end up being errors.
So your build fails when really it should work well enough to do a
test run with your new code. I don't think it has any benefit on code
quality since we already detect warnings in gitlab, etc.
U-Boot is set up so that warnings are reported and are easy to spot if
you use 'make -s' (i.e. not buried in the output).
Regards,
Simon
More information about the U-Boot
mailing list