public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] sim: hw: mark hw_descriptors const
@ 2021-11-27 17:18 Mike Frysinger
  0 siblings, 0 replies; only message in thread
From: Mike Frysinger @ 2021-11-27 17:18 UTC (permalink / raw)
  To: gdb-patches

---
 sim/common/Make-common.in | 2 +-
 sim/common/hw-base.c      | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/sim/common/Make-common.in b/sim/common/Make-common.in
index 7f240240474c..9be682e61173 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 af4cc50f1a4b..dee9359a7b5b 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++)
-- 
2.33.0


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-11-27 17:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-27 17:18 [PATCH] sim: hw: mark hw_descriptors const Mike Frysinger

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).