]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
opcodes/riscv: make riscv_options[] const
authorJan Beulich <jbeulich@suse.com>
Fri, 1 Aug 2025 07:18:15 +0000 (09:18 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 1 Aug 2025 07:18:15 +0000 (09:18 +0200)
There's no reason to allow the array to be modifiable. In fact the
compiler is able to infer this, placing the array in .data.rel.ro, but
let's make it explicit.

opcodes/riscv-dis.c

index f6af9c47a25d07e1e9687ed99a122480c44f6d89..fa2d44af28f6abd39adb195b5d3d05570b3da4d0 100644 (file)
@@ -1612,7 +1612,7 @@ typedef enum
 
 /* Valid RISCV disassembler options.  */
 
-static struct
+static const struct
 {
   const char *name;
   const char *description;