The variable used to be the return value for test_for_exception(), but commit 932ba2d2f530 ("x86: simplify test_for_exception trigger functions"), changed the logic of that function, so that it is now unused. Clang from Fedora 45 started to complain about this: lib/x86/desc.c:483:13: error: variable 'exception' set but not used [-Werror,-Wunused-but-set-global] 483 | static bool exception; | ^ 1 error generated. Remove it to fix the problem. Fixes: 932ba2d2f530 ("x86: simplify test_for_exception trigger functions") Signed-off-by: Thomas Huth --- lib/x86/desc.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/x86/desc.c b/lib/x86/desc.c index f4cdfbc9..b5d40562 100644 --- a/lib/x86/desc.c +++ b/lib/x86/desc.c @@ -480,7 +480,6 @@ void setup_alt_stack(void) } #endif -static bool exception; static jmp_buf *exception_jmpbuf; static void exception_handler_longjmp(void) @@ -491,7 +490,6 @@ static void exception_handler_longjmp(void) static void exception_handler(struct ex_regs *regs) { /* longjmp must happen after iret, so do not do it now. */ - exception = true; regs->rip = (unsigned long)&exception_handler_longjmp; regs->cs = read_cs(); } -- 2.56.0