Source-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: src
Module Name: src
Committed By: rillig
Date: Tue Jul 5 22:50:42 UTC 2022
Modified Files:
src/distrib/sets/lists/tests: mi
src/tests/usr.bin/xlint/lint1: Makefile
src/usr.bin/xlint/lint1: Makefile Makefile.err-msgs-h README.md
check-msgs.lua err.c externs1.h lint1.h main1.c makeman tree.c
src/usr.bin/xlint/xlint: lint.1 xlint.c
Added Files:
src/tests/usr.bin/xlint/lint1: queries.c
Log Message:
lint: add additional queries that are not enabled by default
In the last 18 months, several lint warnings have been made adjusted to
allow common usage patterns. For example, lint no longer warns about a
constant condition in the statement 'do { ... } while (false)' (message
161), as this pattern is well-known in statement-like macros, making it
unlikely that the 'false' is a mistake. Another example is casts
between unequal pointer types (message 247) for a few well-known
patterns that are unlikely to be bugs.
Occasionally, it is useful to query the code for patterns or events that
would not justify a warning. These patterns are modeled as predefined
queries that can be selected individually, in addition to and
independently of the existing warnings and errors.
New queries can be added as needed, in the same way as new warnings.
Queries that are deemed no longer used can be deactivated in the same
way as warnings that are no longer used.
As long as none of the queries is enabled, they produce a minimal
overhead of querying a single global variable. Computations that are
more expensive than a few machine instructions should be guarded by
any_query_enabled.
https://mail-index.netbsd.org/source-changes-d/2022/06/28/msg013716.html
ok christos@
To generate a diff of this commit:
cvs rdiff -u -r1.1215 -r1.1216 src/distrib/sets/lists/tests/mi
cvs rdiff -u -r1.128 -r1.129 src/tests/usr.bin/xlint/lint1/Makefile
cvs rdiff -u -r0 -r1.1 src/tests/usr.bin/xlint/lint1/queries.c
cvs rdiff -u -r1.91 -r1.92 src/usr.bin/xlint/lint1/Makefile
cvs rdiff -u -r1.3 -r1.4 src/usr.bin/xlint/lint1/Makefile.err-msgs-h
cvs rdiff -u -r1.7 -r1.8 src/usr.bin/xlint/lint1/README.md
cvs rdiff -u -r1.16 -r1.17 src/usr.bin/xlint/lint1/check-msgs.lua
cvs rdiff -u -r1.180 -r1.181 src/usr.bin/xlint/lint1/err.c
cvs rdiff -u -r1.164 -r1.165 src/usr.bin/xlint/lint1/externs1.h
cvs rdiff -u -r1.155 -r1.156 src/usr.bin/xlint/lint1/lint1.h
cvs rdiff -u -r1.64 -r1.65 src/usr.bin/xlint/lint1/main1.c
cvs rdiff -u -r1.5 -r1.6 src/usr.bin/xlint/lint1/makeman
cvs rdiff -u -r1.470 -r1.471 src/usr.bin/xlint/lint1/tree.c
cvs rdiff -u -r1.53 -r1.54 src/usr.bin/xlint/xlint/lint.1
cvs rdiff -u -r1.93 -r1.94 src/usr.bin/xlint/xlint/xlint.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