From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1521) id 5A5623885C36; Thu, 10 Nov 2022 07:29:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5A5623885C36 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1668065389; bh=vrZB08ucDAweXz1xUQgisqZwVvtNYu1HclGM48Yh3xo=; h=From:To:Subject:Date:From; b=I3bFaSiyTAJf+VOJglFojJq8oslPBxEwMI4zYvo/OffGXjQ90BueNhQl5596wpfjC ToQ26qVUyvAznXmJAVzOvJ7vg3jHOBgCNcjPMPWvDmH66Yfba0psUSzYpOuAwxXWq9 VmFI2Rq6cXvGLn3XgjQMcqdW90HI8OrXEBtG/0Co= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Michael Frysinger To: gdb-cvs@sourceware.org Subject: [binutils-gdb] sim: ppc: constify spreg table X-Act-Checkin: binutils-gdb X-Git-Author: Mike Frysinger X-Git-Refname: refs/heads/master X-Git-Oldrev: 5967ca921c88a09d7cec9d9864ae23799d88ffbb X-Git-Newrev: 23af236b63a96738c195d2544abfc85552abd0a2 Message-Id: <20221110072949.5A5623885C36@sourceware.org> Date: Thu, 10 Nov 2022 07:29:49 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D23af236b63a9= 6738c195d2544abfc85552abd0a2 commit 23af236b63a96738c195d2544abfc85552abd0a2 Author: Mike Frysinger Date: Thu Nov 10 02:06:48 2022 +0700 sim: ppc: constify spreg table =20 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) =20 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] =3D {\n"); + lf_printf(file, "static const spreg_info spr_info[nr_of_sprs+1] =3D {\n"= ); entry =3D table->sprs; for (spreg_nr =3D 0; spreg_nr < nr_of_sprs+1; spreg_nr++) { if (entry =3D=3D NULL || spreg_nr < entry->spreg_nr)