public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* Constify nm format array
@ 2022-11-24  7:31 Alan Modra
  0 siblings, 0 replies; only message in thread
From: Alan Modra @ 2022-11-24  7:31 UTC (permalink / raw)
  To: binutils

	* nm.c (formats, format): Make const.

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;
 

-- 
Alan Modra
Australia Development Lab, IBM

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-11-24  7:31 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:31 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).