diff options
author | Pedro Alves <palves@redhat.com> | 2017-04-05 19:21:33 +0100 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2017-04-05 19:21:33 +0100 |
commit | f995bbe8e62fdb5607acb1ee127240cfe50d2b8f (patch) | |
tree | a4655a0335b4f97405a4cd3316e954cda2fdd421 /gdb/arm-tdep.c | |
parent | 0ad9d8c73486e60c5a4963c1b7a0ea7063d69cd2 (diff) | |
download | binutils-gdb-f995bbe8e62fdb5607acb1ee127240cfe50d2b8f.tar.gz |
-Wwrite-strings: Constify struct disassemble_info's disassembler_options field
The memory disassemble_info::disassembler_options points to is always
owned by the client. I.e., that field is an non-owning, observing
pointer. Thus const makes sense.
Are the include/ and opcodes/ bits OK?
Tested on x86_64 Fedora 23, built with --enable-targets=all.
include/ChangeLog:
2017-04-05 Pedro Alves <palves@redhat.com>
* dis-asm.h (disassemble_info) <disassembler_options>: Now a
"const char *".
(next_disassembler_option): Constify.
opcodes/ChangeLog:
2017-04-05 Pedro Alves <palves@redhat.com>
* arc-dis.c (parse_option, parse_disassembler_options): Constify.
* arm-dis.c (parse_arm_disassembler_options): Constify.
* ppc-dis.c (powerpc_init_dialect): Constify local.
* vax-dis.c (parse_disassembler_options): Constify.
gdb/ChangeLog:
2017-04-05 Pedro Alves <palves@redhat.com>
* arm-tdep.c (show_disassembly_style_sfunc): Constify local.
* disasm.c (set_disassembler_options): Constify local.
* i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
Diffstat (limited to 'gdb/arm-tdep.c')
-rw-r--r-- | gdb/arm-tdep.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c index b3c3705c78e..ade770ea016 100644 --- a/gdb/arm-tdep.c +++ b/gdb/arm-tdep.c @@ -8562,7 +8562,7 @@ show_disassembly_style_sfunc (struct ui_file *file, int from_tty, char *options = get_disassembler_options (gdbarch); const char *style = ""; int len = 0; - char *opt; + const char *opt; FOR_EACH_DISASSEMBLER_OPTION (opt, options) if (CONST_STRNEQ (opt, "reg-names-")) |