[PATCH] sid/sim: constify sim_machs storage

Mike Frysinger via Cgen <[email protected]> Mon, 28 Jun 2021 11:34:20 -0400
Newsgroups gmane.comp.tools.cgen.devel
Message-ID <[email protected]>
The array itself is read-only, so mark it const.
---
 sid.scm | 2 +-
 sim.scm | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/sid.scm b/sid.scm
index d6d6ed30a890..c34338371d82 100644
--- a/sid.scm
+++ b/sid.scm
@@ -1361,7 +1361,7 @@
 
 (define (/gen-mach-data)
   (string-append
-   "const MACH *sim_machs[] =\n{\n"
+   "const MACH * const sim_machs[] =\n{\n"
    (string-map (lambda (mach)
 		 (gen-obj-sanitize
 		  mach
diff --git a/sim.scm b/sim.scm
index f965ef1fcb17..a153f8cee720 100644
--- a/sim.scm
+++ b/sim.scm
@@ -1475,7 +1475,7 @@
 
 (define (/gen-mach-data)
   (string-append
-   "const SIM_MACH *sim_machs[] =\n{\n"
+   "const SIM_MACH * const sim_machs[] =\n{\n"
    (string-map (lambda (mach)
 		 (gen-obj-sanitize
 		  mach
-- 
2.31.1