From: simon.marchi@polymtl.ca
To: gdb-patches@sourceware.org, binutils@sourceware.org
Cc: Simon Marchi <simon.marchi@polymtl.ca>
Subject: [PATCH 2/3] opcodes: fix a few -Wdiscarded-qualifiers errors
Date: Mon, 23 Feb 2026 08:26:37 -0500 [thread overview]
Message-ID: <20260223132805.3186869-3-simon.marchi@polymtl.ca> (raw)
In-Reply-To: <20260223132805.3186869-1-simon.marchi@polymtl.ca>
From: Simon Marchi <simon.marchi@polymtl.ca>
Change-Id: Ifd43eb7ceee3bebc8be690a7fba94fc8651ffcd6
---
opcodes/aarch64-dis.c | 2 +-
opcodes/ia64-opc.c | 2 +-
opcodes/ip2k-asm.c | 2 +-
opcodes/riscv-dis.c | 4 ++--
opcodes/tilegx-opc.c | 2 +-
opcodes/tilepro-opc.c | 2 +-
6 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/opcodes/aarch64-dis.c b/opcodes/aarch64-dis.c
index 8cc2eb3f3c20..f09307847e64 100644
--- a/opcodes/aarch64-dis.c
+++ b/opcodes/aarch64-dis.c
@@ -4087,7 +4087,7 @@ print_operands (bfd_vma pc, const aarch64_opcode *opcode,
static void
remove_dot_suffix (char *name, const aarch64_inst *inst)
{
- char *ptr;
+ const char *ptr;
size_t len;
ptr = strchr (inst->opcode->name, '.');
diff --git a/opcodes/ia64-opc.c b/opcodes/ia64-opc.c
index 5d79cf3d041a..79c12a840a74 100644
--- a/opcodes/ia64-opc.c
+++ b/opcodes/ia64-opc.c
@@ -66,7 +66,7 @@ const struct ia64_templ_desc ia64_templ_desc[16] =
static void
get_opc_prefix (const char **ptr, char *dest)
{
- char *c = strchr (*ptr, '.');
+ const char *c = strchr (*ptr, '.');
if (c != NULL)
{
memcpy (dest, *ptr, c - *ptr);
diff --git a/opcodes/ip2k-asm.c b/opcodes/ip2k-asm.c
index 18bd98a28463..3adbd1546a38 100644
--- a/opcodes/ip2k-asm.c
+++ b/opcodes/ip2k-asm.c
@@ -59,7 +59,7 @@ parse_fr (CGEN_CPU_DESC cd,
{
const char *errmsg;
const char *old_strp;
- char *afteroffset;
+ const char *afteroffset;
enum cgen_parse_operand_result result_type;
bfd_vma value;
extern CGEN_KEYWORD ip2k_cgen_opval_register_names;
diff --git a/opcodes/riscv-dis.c b/opcodes/riscv-dis.c
index 03c8cf1e344c..eda802ff4202 100644
--- a/opcodes/riscv-dis.c
+++ b/opcodes/riscv-dis.c
@@ -110,7 +110,7 @@ parse_riscv_dis_option_without_args (const char *option,
/* Parse RISC-V disassembler option (possibly with arguments). */
static void
-parse_riscv_dis_option (const char *option, struct disassemble_info *info)
+parse_riscv_dis_option (char *option, struct disassemble_info *info)
{
char *equal, *value;
@@ -1140,7 +1140,7 @@ riscv_update_map_state (int n,
/* ISA mapping string may be numbered, suffixed with '.n'. Do not
consider this as part of the ISA string. */
- char *suffix = strchr (name, '.');
+ const char *suffix = strchr (name, '.');
if (suffix)
{
int suffix_index = (int)(suffix - name);
diff --git a/opcodes/tilegx-opc.c b/opcodes/tilegx-opc.c
index db762e224932..a1d42d6e18d0 100644
--- a/opcodes/tilegx-opc.c
+++ b/opcodes/tilegx-opc.c
@@ -8003,7 +8003,7 @@ tilegx_spr_compare (const void *a_ptr, const void *b_ptr)
const char *
get_tilegx_spr_name (int num)
{
- void *result;
+ const void *result;
struct tilegx_spr key;
key.number = num;
diff --git a/opcodes/tilepro-opc.c b/opcodes/tilepro-opc.c
index 664122b05d51..a96388836953 100644
--- a/opcodes/tilepro-opc.c
+++ b/opcodes/tilepro-opc.c
@@ -10119,7 +10119,7 @@ tilepro_spr_compare (const void *a_ptr, const void *b_ptr)
const char *
get_tilepro_spr_name (int num)
{
- void *result;
+ const void *result;
struct tilepro_spr key;
key.number = num;
--
2.53.0
next prev parent reply other threads:[~2026-02-23 13:29 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-23 13:26 [PATCH 0/3] Fix some more " simon.marchi
2026-02-23 13:26 ` [PATCH 1/3] bfd: fix 2 " simon.marchi
2026-02-23 14:20 ` Jan Beulich
2026-02-24 15:36 ` Simon Marchi
2026-02-23 13:26 ` simon.marchi [this message]
2026-02-23 14:27 ` [PATCH 2/3] opcodes: fix a few " Jan Beulich
2026-02-24 1:14 ` Alan Modra
2026-02-24 14:58 ` Keith Seitz
2026-02-24 15:46 ` Simon Marchi
2026-02-24 17:17 ` Keith Seitz
2026-02-24 22:57 ` Alan Modra
2026-02-25 14:50 ` Keith Seitz
2026-02-23 13:26 ` [PATCH 3/3] sim: " simon.marchi
2026-02-26 18:21 ` 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=20260223132805.3186869-3-simon.marchi@polymtl.ca \
--to=simon.marchi@polymtl.ca \
--cc=binutils@sourceware.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