From: Simon Marchi <simon.marchi@polymtl.ca>
To: gdb@sourceware.org
Subject: [PATCH 2/2] gdb/microblaze-tdep.c: fix -Wunused-but-set-variable
Date: Fri, 3 Dec 2021 16:30:40 -0500 [thread overview]
Message-ID: <20211203213040.1425503-2-simon.marchi@polymtl.ca> (raw)
In-Reply-To: <20211203213040.1425503-1-simon.marchi@polymtl.ca>
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
next prev parent reply other threads:[~2021-12-03 21:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-03 21:30 [PATCH 1/2] gdb/csky-tdep.c: fix -Wunused-but-set-variable error Simon Marchi
2021-12-03 21:30 ` Simon Marchi [this message]
2021-12-03 21:31 ` Simon Marchi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211203213040.1425503-2-simon.marchi@polymtl.ca \
--to=simon.marchi@polymtl.ca \
--cc=gdb@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).