<feed xmlns='http://www.w3.org/2005/Atom'>
<title>netbsd/usr.bin/xlint/lint1/main1.c, branch lockdoc-10.99.5</title>
<subtitle>NetBSD fork for lockdoc analysis</subtitle>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/'/>
<entry>
<title>lint: only skip 'unused' warnings after errors, not other warnings</title>
<updated>2023-07-07T06:03:31+00:00</updated>
<author>
<name>rillig</name>
<email>rillig@NetBSD.org</email>
</author>
<published>2023-07-07T06:03:31+00:00</published>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/commit/?id=f260bdb92f361d3b4e3ab9d23e5f0eb4faafd698'/>
<id>f260bdb92f361d3b4e3ab9d23e5f0eb4faafd698</id>
<content type='text'>
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.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.</pre>
</div>
</content>
</entry>
<entry>
<title>lint: sync usage messages with reality</title>
<updated>2023-07-03T11:16:32+00:00</updated>
<author>
<name>rillig</name>
<email>rillig@NetBSD.org</email>
</author>
<published>2023-07-03T11:16:32+00:00</published>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/commit/?id=018aed9ed29a485e1e2e733d0b785b77f66f5f58'/>
<id>018aed9ed29a485e1e2e733d0b785b77f66f5f58</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>lint: invert the -u, -v and -z flags</title>
<updated>2023-07-03T10:23:12+00:00</updated>
<author>
<name>rillig</name>
<email>rillig@NetBSD.org</email>
</author>
<published>2023-07-03T10:23:12+00:00</published>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/commit/?id=52834b01025b5c70d34c6b660c60be891df535ac'/>
<id>52834b01025b5c70d34c6b660c60be891df535ac</id>
<content type='text'>
Now they behave the same as in the manual page.

No functional change.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Now they behave the same as in the manual page.

No functional change.</pre>
</div>
</content>
</entry>
<entry>
<title>lint: remove redundant comments for command line flags</title>
<updated>2023-07-03T10:14:31+00:00</updated>
<author>
<name>rillig</name>
<email>rillig@NetBSD.org</email>
</author>
<published>2023-07-03T10:14:31+00:00</published>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/commit/?id=6f9b7795090406af5eb40ffeef54987e595b4463'/>
<id>6f9b7795090406af5eb40ffeef54987e595b4463</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>lint: fix C11 mode to not allow C23 features (since yesterday)</title>
<updated>2023-07-03T09:33:07+00:00</updated>
<author>
<name>rillig</name>
<email>rillig@NetBSD.org</email>
</author>
<published>2023-07-03T09:33:07+00:00</published>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/commit/?id=15634e13e311fa073f9e525ca9c777f98d1fcc4c'/>
<id>15634e13e311fa073f9e525ca9c777f98d1fcc4c</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>lint: add initial support for C23</title>
<updated>2023-07-02T23:40:23+00:00</updated>
<author>
<name>rillig</name>
<email>rillig@NetBSD.org</email>
</author>
<published>2023-07-02T23:40:23+00:00</published>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/commit/?id=369d3f5ede350876c7202bf19e3d8152d6ef607e'/>
<id>369d3f5ede350876c7202bf19e3d8152d6ef607e</id>
<content type='text'>
Required by xsrc/external/mit/MesaLib.old, brw_eu_validate.c, which
initializes a struct using empty braces: 'return (struct string){};'.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Required by xsrc/external/mit/MesaLib.old, brw_eu_validate.c, which
initializes a struct using empty braces: 'return (struct string){};'.</pre>
</div>
</content>
</entry>
<entry>
<title>lint: remove custom memory allocator</title>
<updated>2023-01-13T19:41:50+00:00</updated>
<author>
<name>rillig</name>
<email>rillig@NetBSD.org</email>
</author>
<published>2023-01-13T19:41:50+00:00</published>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/commit/?id=46fdf5bb9510fc824205f7238d87940fe0dca212'/>
<id>46fdf5bb9510fc824205f7238d87940fe0dca212</id>
<content type='text'>
Besides adding complexity, the custom memory allocator didn't invalidate
freed memory, which made it harder to find possible use-after-free bugs.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Besides adding complexity, the custom memory allocator didn't invalidate
freed memory, which made it harder to find possible use-after-free bugs.</pre>
</div>
</content>
</entry>
<entry>
<title>lint: add additional queries that are not enabled by default</title>
<updated>2022-07-05T22:50:41+00:00</updated>
<author>
<name>rillig</name>
<email>rillig@NetBSD.org</email>
</author>
<published>2022-07-05T22:50:41+00:00</published>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/commit/?id=0af41c86908602bce970e1d6238d528e5b32aedb'/>
<id>0af41c86908602bce970e1d6238d528e5b32aedb</id>
<content type='text'>
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@</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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@</pre>
</div>
</content>
</entry>
<entry>
<title>lint: move error handling code from main1.c to err.c</title>
<updated>2022-07-01T21:25:39+00:00</updated>
<author>
<name>rillig</name>
<email>rillig@NetBSD.org</email>
</author>
<published>2022-07-01T21:25:39+00:00</published>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/commit/?id=fc0b74ac5d2ef5e0955acf29e42622eaee27e2bd'/>
<id>fc0b74ac5d2ef5e0955acf29e42622eaee27e2bd</id>
<content type='text'>
No functional change.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
No functional change.</pre>
</div>
</content>
</entry>
<entry>
<title>lint: report proper file name in assertion failures</title>
<updated>2022-05-30T15:13:25+00:00</updated>
<author>
<name>rillig</name>
<email>rillig@NetBSD.org</email>
</author>
<published>2022-05-30T15:13:25+00:00</published>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/commit/?id=e557de9349523243d5413937823e1a2808d9745b'/>
<id>e557de9349523243d5413937823e1a2808d9745b</id>
<content type='text'>
When given the (obviously malformed) translation unit 'f=({;};}', lint
runs into an assertion failure.  It reported this as occurring near
':1'.  This location was missing a filename since the input didn't
contain a GCC line number directive such as '# 2 "input.c"'.  In GCC mode,
the GCC builtins are loaded first, in which case the reported location
was ':9'.

Fix this by providing proper location information, even for input that
does not come from the GCC C preprocessor.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When given the (obviously malformed) translation unit 'f=({;};}', lint
runs into an assertion failure.  It reported this as occurring near
':1'.  This location was missing a filename since the input didn't
contain a GCC line number directive such as '# 2 "input.c"'.  In GCC mode,
the GCC builtins are loaded first, in which case the reported location
was ':9'.

Fix this by providing proper location information, even for input that
does not come from the GCC C preprocessor.</pre>
</div>
</content>
</entry>
</feed>
