[binutils-gdb] opcodes/riscv: make riscv_options[] const
Jan Beulich
jbeulich@sourceware.org
Fri Aug 1 07:19:41 GMT 2025
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=f67b2bc9d9e0e7ef2ad4bc2f05da940556ebb451
commit f67b2bc9d9e0e7ef2ad4bc2f05da940556ebb451
Author: Jan Beulich <jbeulich@suse.com>
Date: Fri Aug 1 09:18:15 2025 +0200
opcodes/riscv: make riscv_options[] const
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.
Diff:
---
opcodes/riscv-dis.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/opcodes/riscv-dis.c b/opcodes/riscv-dis.c
index f6af9c47a25..fa2d44af28f 100644
--- a/opcodes/riscv-dis.c
+++ b/opcodes/riscv-dis.c
@@ -1612,7 +1612,7 @@ typedef enum
/* Valid RISCV disassembler options. */
-static struct
+static const struct
{
const char *name;
const char *description;
More information about the Binutils-cvs
mailing list