From: Mike Frysinger <vapier@gentoo.org>
To: gdb-patches@sourceware.org
Subject: [PATCH/committed] sim: warnings: fix unused variable warnings
Date: Mon, 8 Jan 2024 21:23:49 -0500 [thread overview]
Message-ID: <20240109022349.24789-1-vapier@gentoo.org> (raw)
Leave the igen code in place as it's meant to be used with newer
(to-be-written) code ported from the ppc version.
The sh code isn't really necessary as the opcodes enums have been
maintained independently from here, and the lists are out-of-sync
already.
---
sim/igen/ld-decode.c | 2 ++
sim/igen/table.c | 11 ++++---
sim/sh/gencode.c | 70 --------------------------------------------
3 files changed, 7 insertions(+), 76 deletions(-)
diff --git a/sim/igen/ld-decode.c b/sim/igen/ld-decode.c
index 6edd7c8ec3d6..6a2d859deb30 100644
--- a/sim/igen/ld-decode.c
+++ b/sim/igen/ld-decode.c
@@ -61,12 +61,14 @@ static const name_map decode_combine_map[] = {
{NULL, 0},
};
+#if 0
static const name_map decode_search_map[] = {
{"constants", decode_find_constants},
{"mixed", decode_find_mixed},
{"strings", decode_find_strings},
{NULL, decode_find_mixed},
};
+#endif
static void
diff --git a/sim/igen/table.c b/sim/igen/table.c
index fdca9cb32554..90b4102ac02d 100644
--- a/sim/igen/table.c
+++ b/sim/igen/table.c
@@ -490,7 +490,6 @@ extern void
table_print_code (lf *file, const table_entry *entry)
{
int field_nr;
- int nr = 0;
for (field_nr = 0; field_nr < entry->nr_fields; field_nr++)
{
char *chp = entry->field[field_nr];
@@ -502,20 +501,20 @@ table_print_code (lf *file, const table_entry *entry)
if (chp[0] == '{' && !isspace (chp[1]) && chp[1] != '\0')
{
in_bit_field = 1;
- nr += lf_putchr (file, '_');
+ lf_putchr (file, '_');
}
else if (in_bit_field && chp[0] == ':')
{
- nr += lf_putchr (file, '_');
+ lf_putchr (file, '_');
}
else if (in_bit_field && *chp == '}')
{
- nr += lf_putchr (file, '_');
+ lf_putchr (file, '_');
in_bit_field = 0;
}
else
{
- nr += lf_putchr (file, *chp);
+ lf_putchr (file, *chp);
}
chp++;
}
@@ -525,7 +524,7 @@ table_print_code (lf *file, const table_entry *entry)
line.line_nr += field_nr;
error (&line, "Bit field brace miss match\n");
}
- nr += lf_putchr (file, '\n');
+ lf_putchr (file, '\n');
}
}
diff --git a/sim/sh/gencode.c b/sim/sh/gencode.c
index 8246e89432f0..b00a16a445a4 100644
--- a/sim/sh/gencode.c
+++ b/sim/sh/gencode.c
@@ -2468,76 +2468,6 @@ static op ppi_tab[] =
{0, 0}
};
-/* Tables of things to put into enums for sh-opc.h */
-static
-const char * const nibble_type_list[] =
-{
- "HEX_0",
- "HEX_1",
- "HEX_2",
- "HEX_3",
- "HEX_4",
- "HEX_5",
- "HEX_6",
- "HEX_7",
- "HEX_8",
- "HEX_9",
- "HEX_A",
- "HEX_B",
- "HEX_C",
- "HEX_D",
- "HEX_E",
- "HEX_F",
- "REG_N",
- "REG_M",
- "BRANCH_12",
- "BRANCH_8",
- "DISP_8",
- "DISP_4",
- "IMM_4",
- "IMM_4BY2",
- "IMM_4BY4",
- "PCRELIMM_8BY2",
- "PCRELIMM_8BY4",
- "IMM_8",
- "IMM_8BY2",
- "IMM_8BY4",
- 0
-};
-static
-const char * const arg_type_list[] =
-{
- "A_END",
- "A_BDISP12",
- "A_BDISP8",
- "A_DEC_M",
- "A_DEC_N",
- "A_DISP_GBR",
- "A_DISP_PC",
- "A_DISP_REG_M",
- "A_DISP_REG_N",
- "A_GBR",
- "A_IMM",
- "A_INC_M",
- "A_INC_N",
- "A_IND_M",
- "A_IND_N",
- "A_IND_R0_REG_M",
- "A_IND_R0_REG_N",
- "A_MACH",
- "A_MACL",
- "A_PR",
- "A_R0",
- "A_R0_GBR",
- "A_REG_M",
- "A_REG_N",
- "A_SR",
- "A_VBR",
- "A_SSR",
- "A_SPC",
- 0,
-};
-
static int
qfunc (const void *va, const void *vb)
{
--
2.43.0
reply other threads:[~2024-01-09 2:23 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20240109022349.24789-1-vapier@gentoo.org \
--to=vapier@gentoo.org \
--cc=gdb-patches@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).