History log of /src/usr.bin/xlint/lint1/cksnprintb.c |
Revision | | Date | Author | Comments |
1.16 |
| 31-Aug-2025 |
rillig | lint: check for mismatches in snprintb conversions
Seen in sh3/dmacreg.h, SH3_DMAC_CHCR_BITS.
|
1.15 |
| 12-May-2024 |
rillig | lint: add wrapper for <ctype.h> functions, for strict bool mode
When using the Clang preprocessor (with MKLLVM=yes), the preprocessor output does not indicate which tokens come from a system header and which tokens come from the user code. Lint's strict bool mode relies on this information to treat the character classification functions from <ctype.h> as if their return type were bool instead of int.
These wrapper functions are only used when their argument is indeed a 'char', but not when the argument might be 'EOF or representable as an unsigned char', such as when reading a byte from the input.
|
1.14 |
| 12-Apr-2024 |
rillig | lint: clean up and speed up the check for snprintb
|
1.13 |
| 12-Apr-2024 |
rillig | lint: in snprintb, warn about all escaped characters in descriptions
|
1.12 |
| 25-Mar-2024 |
rillig | lint: rename snprintb 'directives' to 'conversions'
This aligns the terminology with the snprintf function.
|
1.11 |
| 13-Mar-2024 |
rillig | lint: trim down the check for snprintb formats
|
1.10 |
| 10-Mar-2024 |
rillig | lint: clean up tree matcher for snprintb calls
|
1.9 |
| 09-Mar-2024 |
rillig | lint: inline accessor macros for tnode_t
|
1.8 |
| 09-Mar-2024 |
rillig | lint: remove unneeded checks for left and right operands
|
1.7 |
| 03-Mar-2024 |
rillig | lint: clean up string parsing and snprintb check
|
1.6 |
| 03-Mar-2024 |
rillig | lint: warn about escaped snprintb directive
Repurpose message 362, as the previous version was redundant since null bytes in old-style formats are already covered by message 371 (bit position out of range) and 377 (redundant '\0' at the end).
|
1.5 |
| 03-Mar-2024 |
rillig | lint: fix warning about "empty" single-letter snprintb descriptions
|
1.4 |
| 03-Mar-2024 |
rillig | lint: check for unreachable bits and fields in snprintb formats
While here, clean up a few existing checks.
|
1.3 |
| 02-Mar-2024 |
rillig | lint: check snprintb formats for overlapping bits and fields
|
1.2 |
| 01-Mar-2024 |
rillig | lint: fix misleading initializer for string iterator
The field 'start' marks the start of the previous matching character, not the current iterator position.
No binary change.
|
1.1 |
| 01-Mar-2024 |
rillig | lint: test format strings from snprintb calls
The functions snprintb and snprintb_m are specific to NetBSD, and their format strings are tricky to get correct. Provide some assistance in catching the most common mistakes.
|