From: Tom Tromey Date: Thu, 14 Mar 2024 18:25:42 +0000 (-0600) Subject: Constify ada-lex.l:attributes X-Git-Tag: gdb-15-branchpoint~518 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=051889c8104c3c959b903d08e9afbcb7e9670c43;p=thirdparty%2Fbinutils-gdb.git Constify ada-lex.l:attributes While examining the Ada parser globals with 'nm', I noticed that the lexer's "attributes" array should be const. This change moves it into read-only storage. --- diff --git a/gdb/ada-lex.l b/gdb/ada-lex.l index 4e99eaab036..1b1aaf89005 100644 --- a/gdb/ada-lex.l +++ b/gdb/ada-lex.l @@ -662,7 +662,7 @@ subseqMatch (const char *subseq, const char *str) } -static struct { const char *name; int code; } +static const struct { const char *name; int code; } attributes[] = { { "address", TICK_ADDRESS }, { "unchecked_access", TICK_ACCESS },