aboutsummaryrefslogtreecommitdiff
path: root/sim
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2021-11-27 12:14:28 -0500
committerMike Frysinger <vapier@gentoo.org>2021-11-27 12:15:16 -0500
commitd9a84d15f23a38cce755c558c5b6227eb0ec8d02 (patch)
tree36299532456a14b88ab277d2d18fe81b2817518a /sim
parent6916d9e65c5bc69b469964ae7202c33b309558a4 (diff)
downloadfsf-binutils-gdb-d9a84d15f23a38cce755c558c5b6227eb0ec8d02.zip
fsf-binutils-gdb-d9a84d15f23a38cce755c558c5b6227eb0ec8d02.tar.gz
fsf-binutils-gdb-d9a84d15f23a38cce755c558c5b6227eb0ec8d02.tar.bz2
sim: hw: mark hw_descriptors const
Diffstat (limited to 'sim')
-rw-r--r--sim/common/Make-common.in2
-rw-r--r--sim/common/hw-base.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/sim/common/Make-common.in b/sim/common/Make-common.in
index 7f24024..9be682e 100644
--- a/sim/common/Make-common.in
+++ b/sim/common/Make-common.in
@@ -428,7 +428,7 @@ stamp-hw: Makefile.in $(srccom)/Make-common.in $(config.status) Makefile
sim_hw="$(SIM_HW_DEVICES)" ; \
echo "/* generated by Makefile */" ; \
printf "extern const struct hw_descriptor dv_%s_descriptor[];\n" $$sim_hw ; \
- echo "const struct hw_descriptor *hw_descriptors[] = {" ; \
+ echo "const struct hw_descriptor * const hw_descriptors[] = {" ; \
printf " dv_%s_descriptor,\n" $$sim_hw ; \
echo " NULL," ; \
echo "};" \
diff --git a/sim/common/hw-base.c b/sim/common/hw-base.c
index af4cc50..dee9359 100644
--- a/sim/common/hw-base.c
+++ b/sim/common/hw-base.c
@@ -385,7 +385,7 @@ hw_create (struct sim_state *sd,
/* locate a descriptor */
{
- const struct hw_descriptor **table;
+ const struct hw_descriptor * const *table;
for (table = hw_descriptors;
*table != NULL;
table++)