public inbox for gdb-cvs@sourceware.org help / color / mirror / Atom feed
From: Michael Frysinger <vapier@sourceware.org> To: gdb-cvs@sourceware.org Subject: [binutils-gdb] sim: ppc: constify spreg table Date: Thu, 10 Nov 2022 07:29:49 +0000 (GMT) [thread overview] Message-ID: <20221110072949.5A5623885C36@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=23af236b63a96738c195d2544abfc85552abd0a2 commit 23af236b63a96738c195d2544abfc85552abd0a2 Author: Mike Frysinger <vapier@gentoo.org> Date: Thu Nov 10 02:06:48 2022 +0700 sim: ppc: constify spreg table This internal table is only ever read, so constify it. Diff: --- sim/ppc/dgen.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sim/ppc/dgen.c b/sim/ppc/dgen.c index caafe07a6aa..0f9b02f9108 100644 --- a/sim/ppc/dgen.c +++ b/sim/ppc/dgen.c @@ -196,14 +196,14 @@ gen_spreg_c(spreg_table *table, lf *file) lf_printf(file, "\n"); lf_printf(file, "typedef struct _spreg_info {\n"); - lf_printf(file, " char *name;\n"); + lf_printf(file, " const char *name;\n"); lf_printf(file, " int is_valid;\n"); lf_printf(file, " int length;\n"); lf_printf(file, " int is_readonly;\n"); lf_printf(file, " int index;\n"); lf_printf(file, "} spreg_info;\n"); lf_printf(file, "\n"); - lf_printf(file, "static spreg_info spr_info[nr_of_sprs+1] = {\n"); + lf_printf(file, "static const spreg_info spr_info[nr_of_sprs+1] = {\n"); entry = table->sprs; for (spreg_nr = 0; spreg_nr < nr_of_sprs+1; spreg_nr++) { if (entry == NULL || spreg_nr < entry->spreg_nr)
reply other threads:[~2022-11-10 7:29 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20221110072949.5A5623885C36@sourceware.org \ --to=vapier@sourceware.org \ --cc=gdb-cvs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).