From: Alan Modra Date: Thu, 24 Nov 2022 07:13:07 +0000 (+1030) Subject: Constify nm format array X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5ee755fabb3d1a5e4760c05e48c26567a5f4b3ca;p=binutils-gdb.git Constify nm format array * 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;