[PATCH 2/2] gdb/microblaze-tdep.c: fix -Wunused-but-set-variable

Simon Marchi via Gdb <[email protected]>
Newsgroups gmane.comp.gdb.devel
Message-ID <[email protected]>
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 5309da58cc29..e50f50d2b8c2 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.33.1
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.