Re: [PATCH] LoongArch: Fix some build warnings with -W1 option

From: Xi Ruoyao
Date: Sat Sep 16 2023 - 06:11:15 EST


On Sat, 2023-09-16 at 17:56 +0800, bibo mao wrote:
>
>
> 在 2023/9/16 17:42, Huacai Chen 写道:
> > Hi, Bibo,
> >
> > On Sat, Sep 16, 2023 at 5:23 PM Bibo Mao <maobibo@xxxxxxxxxxx> wrote:
> > >
> > > There are some building warnings when building LoongArch kernel
> > > with -W1 option as following, this patch fixes these building
> > > warnings.
> > Don't touch asm-offsets.c now, because it is being refactored by the community.
> Well, I will bypass this file and send the next version.
>
> Do you think that is it deserved to add -Wno-override-init option
> to remove compiling warning about file syscall.c? I am not sure about it.

What is a -W1 option? At least GCC 13 does not recognize it.

And generally you cannot randomly add warning options building the
kernel and expect a clean result. I don't think we should "fix"
breakages caused by custom warnings at all, unless the warning indicates
a real issue.


--
Xi Ruoyao <xry111@xxxxxxxxxxx>
School of Aerospace Science and Technology, Xidian University