| Age | Commit message (Collapse) | Author |
|
|
|
Pointer casts from an integer type to a floating-point type and vice
versa get a 'maybe troublesome' warning now. The previous assumption
that all types of the same bit-size are convertible may have been valid
from a technical point of view, but still such code should get more
attention.
The rules for struct and union types could be made more fine-grained
later, if the need arises. To suppress this warning, it's always
possible to cast to an intermediate 'void *'.
|
|
This reverts the change from tree.c 1.547 from 2023-07-03. Back then, I
didn't know that the actual value from a type's 'portable size in bits'
was not supposed to be used.
|
|
|
|
PUSH nodes are not marked as binary, yet they have a left and a right
operand.
If none of the queries is enabled, omit the query from the debug log.
|
|
|
|
When lint is compiled on x86-64 (where 'long double' has a 64-bit
mantissa) and targets arm (where 'long double' has a 53-bit mantissa),
warn if a constant cannot fit in the 'long double' of the target
platform, not of the host platform.
|
|
No functional change.
|
|
|
|
In C99 mode, there is no point warning about traditional C.
No change in the tests, as a complete test suite would require several
new test files, and migration mode is not used intensively.
|
|
The existing warning was only issued for function declarations, not for
function definitions.
The interesting change in the tests is in msg_351.c. Many other tests
use non-static functions due to their syntactic brevity. In these
tests, the warning is disabled individually, to allow new functions to
be added without generating warning 351.
|
|
Previously, in -w mode, any warning suppressed further 'unused'
warnings, even though there was no need to do that. This can be seen in
the test gcc_attribute_var.c, where only the last unused variable from a
function was marked as unused, the others slipped through.
Fixed by counting the errors and the warnings separately and only
combining them if actually desired.
|
|
No functional change.
|
|
The test file names don't have a hyphen, so the identifiers shouldn't
have one either.
|
|
Since tree.c 1.546 from 2023-07-03, lint no longer warned about possible
loss of accuracy when converting from 'long' to 'int' on an ILP32
platform that uses 'unsigned long' for size_t, when run in portable mode
(-p), which is enabled by default in the NetBSD build.
The integer constraints avoid false-positive warnings by looking at the
actual values an expression can take. The function can_represent is
guarded by a condition that uses the portable_size_in_bits, but then
internally used the opposite size_in_bits, which led to inconsistent
results.
The warning looks confusing though, as on an ILP32 platform, 'int' and
'long' have the same size and representation, therefore there cannot be
an actual loss of accuracy. The warning may need to be reworded to
explicitly mention the portability mode, in which sizeof(int) is assumed
to be 3 instead of 4, to catch possible loss of accuracy on other
platforms.
|
|
|
|
Now they behave the same as in the manual page.
No functional change.
|
|
|
|
|
|
|
|
No binary change.
|
|
Required by xsrc/external/mit/MesaLib.old, brw_eu_validate.c, which
initializes a struct using empty braces: 'return (struct string){};'.
|
|
|
|
|
|
|
|
No functional change.
|
|
This gets rid of 'unsigned short', which saved a few bytes of memory but
was inconvenient to deal with.
No functional change.
|
|
Indent the debug logging according to the declaration level.
Since there are a few cases where the enclosing declaration levels are
modified, log the whole declaration level stack whenever a level begins
or ends.
|
|
While a regular HTTP Proxy, requires the absolute URL with protocol
and host part, yyou must only send the relative URL through a
CONNECT tunnel (you are talking to the target server).
|
|
See set_bit_field_width.
|
|
|
|
|
|
No functional change.
|
|
|
|
No functional change.
|
|
|
|
|
|
|
|
|
|
The previous prefix 'DK_' (declaration level kind) had a conflict with
the 'DK_' (designator kind) in init.c, so change the prefix to 'DLK_'.
The new name for dinfo_t is decl_level, which is more expressive.
No functional change.
|
|
The support for unnamed struct/union members that was added in decl.c
1.60 from 2015-10-13 was simple but wrong. It didn't cover initializers
of these structures and computed wrong sizes for structures containing
anonymous unions. At that time, the handling of initializers was broken
as well, it was fixed 6 years later in init.c 1.229 from 2021-12-22.
Real-life examples for code that lint couldn't handle are:
* external/bsd/jemalloc/dist/src/jemalloc.c
* external/mit/xorg/lib/dri.old/Makefile
|
|
No functional change.
|
|
No functional change.
|
|
When bit-fields in packed structs were added on 2009-10-02, lint assumed
that they would only use 'signed int' or 'unsigned int' as storage unit,
even though C99 also allows _Bool.
The cleanup commit for decl.c 1.225 from 2021-08-28 accidentally changed
the rounding mode for bit-field storage units from round-up to
round-down.
|
|
No functional change outside debug mode.
|
|
No functional change.
|
|
|
|
No binary change.
|
|
|
|
|