aboutsummaryrefslogtreecommitdiff
path: root/binutils/nm.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2022-11-24 17:43:07 +1030
committerAlan Modra <amodra@gmail.com>2022-11-24 17:45:52 +1030
commit5ee755fabb3d1a5e4760c05e48c26567a5f4b3ca (patch)
treeb80333ecef671db35319d6dab93ea759b35e67b3 /binutils/nm.c
parent0b075f19024c0555cca0d887719c7170ec2d6b1c (diff)
downloadgdb-5ee755fabb3d1a5e4760c05e48c26567a5f4b3ca.zip
gdb-5ee755fabb3d1a5e4760c05e48c26567a5f4b3ca.tar.gz
gdb-5ee755fabb3d1a5e4760c05e48c26567a5f4b3ca.tar.bz2
Constify nm format array
* nm.c (formats, format): Make const.
Diffstat (limited to 'binutils/nm.c')
-rw-r--r--binutils/nm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/binutils/nm.c b/binutils/nm.c
index 49726ee..9aad599 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;