[binutils-gdb] sim: fix a few -Wdiscarded-qualifiers errors
Simon Marchi
simark@sourceware.org
Thu Feb 26 18:20:51 GMT 2026
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=38e9187d24b6e14bfadafb6d6feda5770f74ff07
commit 38e9187d24b6e14bfadafb6d6feda5770f74ff07
Author: Simon Marchi <simon.marchi@polymtl.ca>
Date: Mon Feb 23 08:26:38 2026 -0500
sim: fix a few -Wdiscarded-qualifiers errors
Change-Id: I5caaf741a6d3835d593e62c3a567171c09d6241c
Diff:
---
sim/common/sim-options.c | 2 +-
sim/cr16/simops.c | 2 +-
sim/d10v/simops.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/sim/common/sim-options.c b/sim/common/sim-options.c
index c0ad4c79083..8c72b2bc378 100644
--- a/sim/common/sim-options.c
+++ b/sim/common/sim-options.c
@@ -207,7 +207,7 @@ static SIM_RC
env_set (SIM_DESC sd, const char *arg)
{
int i, varlen;
- char *eq;
+ const char *eq;
char **envp;
if (STATE_PROG_ENVP (sd) == NULL)
diff --git a/sim/cr16/simops.c b/sim/cr16/simops.c
index f26bccf870d..8e180840154 100644
--- a/sim/cr16/simops.c
+++ b/sim/cr16/simops.c
@@ -296,7 +296,7 @@ trace_input_func (SIM_DESC sd, const char *name, enum op_types in1, enum op_type
}
else if (filename)
{
- char *q = strrchr (filename, '/');
+ const char *q = strrchr (filename, '/');
sprintf (p, "%s ", (q) ? q+1 : filename);
p += strlen (p);
}
diff --git a/sim/d10v/simops.c b/sim/d10v/simops.c
index bc7806cc278..0ad85879bad 100644
--- a/sim/d10v/simops.c
+++ b/sim/d10v/simops.c
@@ -232,7 +232,7 @@ trace_input_func (SIM_DESC sd, const char *name, enum op_types in1, enum op_type
}
else if (filename)
{
- char *q = strrchr (filename, '/');
+ const char *q = strrchr (filename, '/');
sprintf (p, "%s ", (q) ? q+1 : filename);
p += strlen (p);
}
More information about the Gdb-cvs
mailing list