Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src/usr.bin/xlint/lint1



Module Name:    src
Committed By:   rillig
Date:           Sat Mar 20 19:24:57 UTC 2021

Modified Files:
        src/usr.bin/xlint/lint1: lex.c

Log Message:
lint: use macro for initializing keywords table

Since today, lint's strict bool mode requires initializers to have the
correct type.  The flags in kwtab are of type bool and were initialized
with an int, for brevity.  Keep the brevity and do the conversion from
int to bool in a macro.

By defining several macros for the different kinds of keywords, reduce
the clutter of having 2 additional zeroes per line.  The macros also
remove the redundancy and thereby the possible inconsistency of filling
the wrong fields since these depend on the token type.

No functional change.  The only change to the binary is due to the
changed line numbers in the calls to lint_assert.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/usr.bin/xlint/lint1/lex.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index