Re: [PATCH -next] x86/sev: Remove unused variable "err" in enforce_vmpl0()

From: Li Zetao
Date: Sat Sep 24 2022 - 06:18:30 EST


On 2022/9/23 20:19, Borislav Petkov wrote:

On Fri, Sep 23, 2022 at 11:32:09AM +0000, Li Zetao wrote:
Gcc report warning as follows:

arch/x86/boot/compressed/sev.c: In function ‘enforce_vmpl0’:
arch/x86/boot/compressed/sev.c:256:13: error: unused variable ‘err’
[-Werror=unused-variable]
How do you trigger this? Compiler version and .config?

I haven't seen this one in any of my builds until now...

Thx.

My Compiler version is 11.2.0. I used the default .config and compiled with flags "-Wall -Werror", just as follows:

    make allmodconfig

    make EXTRA_CFLAGS="-Wall -Werror"


Best regards

Li Zetao