[binutils-gdb] opcodes/ppc: make ppc_opts[] static const
Jan Beulich
jbeulich@sourceware.org
Fri Aug 1 07:19:36 GMT 2025
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=b2250bfa948be835b8bf7e19f1d3a822a4d54073
commit b2250bfa948be835b8bf7e19f1d3a822a4d54073
Author: Jan Beulich <jbeulich@suse.com>
Date: Fri Aug 1 09:17:54 2025 +0200
opcodes/ppc: make ppc_opts[] static const
There's no reason to allow the array to be modifiable, nor for it to be
globally visible.
Diff:
---
opcodes/ppc-dis.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/opcodes/ppc-dis.c b/opcodes/ppc-dis.c
index 3e210341228..6e4a3b8d2b2 100644
--- a/opcodes/ppc-dis.c
+++ b/opcodes/ppc-dis.c
@@ -72,7 +72,7 @@ struct ppc_mopt {
ppc_cpu_t sticky;
};
-struct ppc_mopt ppc_opts[] = {
+static const struct ppc_mopt ppc_opts[] = {
{ "403", PPC_OPCODE_PPC | PPC_OPCODE_403,
0 },
{ "405", PPC_OPCODE_PPC | PPC_OPCODE_403 | PPC_OPCODE_405,
More information about the Binutils-cvs
mailing list