From db94f15756752d3360d0ec81bd8143fa94821f3b Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Fri, 3 Dec 2021 16:31:28 -0500 Subject: [PATCH] gdb/microblaze-tdep.c: fix -Wunused-but-set-variable Fix this, seen when building with clang 14: CXX microblaze-tdep.o /home/simark/src/binutils-gdb/gdb/microblaze-tdep.c:207:7: error: variable 'flags' set but not used [-Werror,-Wunused-but-set-variable] int flags = 0; ^ Change-Id: I59f726ed33e924912748bc475b6fd9a9394fc0d0 --- gdb/microblaze-tdep.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/gdb/microblaze-tdep.c b/gdb/microblaze-tdep.c index 5309da58cc2..e50f50d2b8c 100644 --- a/gdb/microblaze-tdep.c +++ b/gdb/microblaze-tdep.c @@ -204,7 +204,6 @@ microblaze_analyze_prologue (struct gdbarch *gdbarch, CORE_ADDR pc, unsigned long insn; int rd, ra, rb, imm; enum microblaze_instr op; - int flags = 0; int save_hidden_pointer_found = 0; int non_stack_instruction_found = 0; @@ -303,8 +302,6 @@ microblaze_analyze_prologue (struct gdbarch *gdbarch, CORE_ADDR pc, { /* We have a frame pointer. Note the register which is acting as the frame pointer. */ - flags |= MICROBLAZE_MY_FRAME_IN_FP; - flags &= ~MICROBLAZE_MY_FRAME_IN_SP; cache->fp_regnum = rd; microblaze_debug ("Found a frame pointer: r%d\n", cache->fp_regnum); save_hidden_pointer_found = 0; -- 2.30.2