Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/xlint/lint1 lint: constify lexer keywords
details: https://anonhg.NetBSD.org/src/rev/6e92cb9c6e85
branches: trunk
changeset: 362475:6e92cb9c6e85
user: rillig <rillig%NetBSD.org@localhost>
date: Mon Feb 28 22:41:07 2022 +0000
description:
lint: constify lexer keywords
No functional change.
diffstat:
usr.bin/xlint/lint1/lex.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (36 lines):
diff -r 063db2c8d88c -r 6e92cb9c6e85 usr.bin/xlint/lint1/lex.c
--- a/usr.bin/xlint/lint1/lex.c Mon Feb 28 17:15:29 2022 +0000
+++ b/usr.bin/xlint/lint1/lex.c Mon Feb 28 22:41:07 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lex.c,v 1.105 2022/02/27 22:46:04 rillig Exp $ */
+/* $NetBSD: lex.c,v 1.106 2022/02/28 22:41:07 rillig Exp $ */
/*
* Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved.
@@ -38,7 +38,7 @@
#include <sys/cdefs.h>
#if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: lex.c,v 1.105 2022/02/27 22:46:04 rillig Exp $");
+__RCSID("$NetBSD: lex.c,v 1.106 2022/02/28 22:41:07 rillig Exp $");
#endif
#include <ctype.h>
@@ -87,7 +87,7 @@
kwdef(name, token, 0, 0, 0, 0, 0, 1, 1, 5)
/* During initialization, these keywords are written to the symbol table. */
-static struct keyword {
+static const struct keyword {
const char *kw_name; /* keyword */
int kw_token; /* token returned by yylex() */
scl_t kw_scl; /* storage class if kw_token T_SCLASS */
@@ -344,7 +344,7 @@
void
initscan(void)
{
- struct keyword *kw;
+ const struct keyword *kw;
for (kw = keywords; kw->kw_name != NULL; kw++) {
if ((kw->kw_c90 || kw->kw_c99) && tflag)
Home |
Main Index |
Thread Index |
Old Index