* [binutils-gdb] Constify nm format array
@ 2022-11-24 7:33 Alan Modra
0 siblings, 0 replies; only message in thread
From: Alan Modra @ 2022-11-24 7:33 UTC (permalink / raw)
To: bfd-cvs
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;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-11-24 7:33 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-24 7:33 [binutils-gdb] Constify nm format array Alan Modra
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).