From ac8ef6961e18664224b55c1eadc611f0e9f1e5b5 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sun, 27 Jun 2021 01:58:18 -0400 Subject: [PATCH] opcodes: constify & localize z80 opcodes These aren't used outside of this module, and are never modified. Mark it static to avoid bad exported variable name issues. --- opcodes/ChangeLog | 5 +++++ opcodes/z80-dis.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog index 2b702213810..66f9980a68f 100644 --- a/opcodes/ChangeLog +++ b/opcodes/ChangeLog @@ -1,3 +1,8 @@ +2021-07-01 Mike Frysinger + + * z80-dis.c (opc_ed): Make const. + (pref_ed): Make p const. + 2021-07-01 Mike Frysinger * microblaze-dis.c (get_field_special): Make op const. diff --git a/opcodes/z80-dis.c b/opcodes/z80-dis.c index 9b9f941276d..0e7a312ff89 100644 --- a/opcodes/z80-dis.c +++ b/opcodes/z80-dis.c @@ -414,7 +414,7 @@ dump (struct buffer *buf, disassemble_info * info, const char *txt) } /* Table to disassemble machine codes with prefix 0xED. */ -struct tab_elt opc_ed[] = +static const struct tab_elt opc_ed[] = { { 0x30, 0xFF, prt, "mul d,e", INSS_Z80N }, { 0x31, 0xFF, prt, "add hl,a", INSS_Z80N }, @@ -525,7 +525,7 @@ static int pref_ed (struct buffer *buf, disassemble_info *info, const char *txt ATTRIBUTE_UNUSED) { - struct tab_elt *p; + const struct tab_elt *p; if (fetch_data (buf, info, 1)) { -- 2.30.2