sim: hw: mark hw_descriptors const
authorMike Frysinger <vapier@gentoo.org>
Sat, 27 Nov 2021 17:14:28 +0000 (12:14 -0500)
committerMike Frysinger <vapier@gentoo.org>
Sat, 27 Nov 2021 17:15:16 +0000 (12:15 -0500)
sim/common/Make-common.in
sim/common/hw-base.c

index 7f240240474cbea13fba9fbecba81018ec166bf0..9be682e61173f6c149162a20c5257b840a97d614 100644 (file)
@@ -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 "};" \
index af4cc50f1a4baf52e288d98567f242aae7092f42..dee9359a7b5b916cc74780e91e5905274a7a84c2 100644 (file)
@@ -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++)