From: Alan Modra <amodra@sourceware.org>
To: bfd-cvs@sourceware.org
Subject: [binutils-gdb] Constify nm format array
Date: Thu, 24 Nov 2022 07:33:07 +0000 (GMT) [thread overview]
Message-ID: <20221124073307.07A683830B16@sourceware.org> (raw)
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=5ee755fabb3d1a5e4760c05e48c26567a5f4b3ca
commit 5ee755fabb3d1a5e4760c05e48c26567a5f4b3ca
Author: Alan Modra <amodra@gmail.com>
Date: Thu Nov 24 17:43:07 2022 +1030
Constify nm format array
* nm.c (formats, format): Make const.
Diff:
---
binutils/nm.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/binutils/nm.c b/binutils/nm.c
index 49726eeb83b..9aad599a9a2 100644
--- a/binutils/nm.c
+++ b/binutils/nm.c
@@ -141,7 +141,7 @@ enum formats
#define FORMAT_DEFAULT FORMAT_BSD
-static struct output_fns formats[FORMAT_MAX] =
+static const struct output_fns formats[FORMAT_MAX] =
{
{print_object_filename_bsd,
print_archive_filename_bsd,
@@ -167,7 +167,7 @@ static struct output_fns formats[FORMAT_MAX] =
/* The output format to use. */
-static struct output_fns *format = &formats[FORMAT_DEFAULT];
+static const struct output_fns *format = &formats[FORMAT_DEFAULT];
static unsigned int print_format = FORMAT_DEFAULT;
static const char *print_format_string = NULL;
reply other threads:[~2022-11-24 7:33 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=20221124073307.07A683830B16@sourceware.org \
--to=amodra@sourceware.org \
--cc=bfd-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: link
Be 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).