From: Mike Frysinger Date: Sat, 27 Nov 2021 17:14:28 +0000 (-0500) Subject: sim: hw: mark hw_descriptors const X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d9a84d15f23a38cce755c558c5b6227eb0ec8d02;p=binutils-gdb.git sim: hw: mark hw_descriptors const --- diff --git a/sim/common/Make-common.in b/sim/common/Make-common.in index 7f240240474..9be682e6117 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 af4cc50f1a4..dee9359a7b5 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++)