linux kernel compiler warnings ignored

Joel Stanley joel at jms.id.au
Tue Apr 30 01:00:27 AEST 2019


On Mon, 29 Apr 2019 at 14:48, Patrick Venture <venture at google.com> wrote:
>
> On Sun, Apr 28, 2019 at 11:33 PM Joel Stanley <joel at jms.id.au> wrote:
> >
> > On Sun, 28 Apr 2019 at 02:43, Lei YU <mine260309 at gmail.com> wrote:
> > >
> > > > I recommend installing your distro's arm cross toolchain if that's possible. It's a much less invasive solution than sourcing the sdk's environment script.
> > >
> > > But it would be convenient for bitbake's kernel build to treat warnings as
> > > errors, so that CI will catch such issues.
> >
> > Can someone take this task on? We would like the kernel build to error
> > out of any of the default warnings are emitted.
>
> So, when building the kernel with W=1 on all modules, wow, there are a
> ton of warnings.

W=1 is the first level of warning insanity. It goes up higher.

I encourage you to also take a look at the output of C=1.

> But presumably there's a class of warning that you
> mean by default or do you mean only error on warnings generated from
> an openbmc build?

I meant the warnings that you get from a normal build should error us
out. We could add this to the kernel command line:

KCFLAGS="-Werror"

In practice this won't be necessary, as I won't apply your patches to
the kernel if it introduces an error. But if it helps other developers
do their jobs then I'd +1 a patch to do it.

Cheers,

Joel


More information about the openbmc mailing list