<feed xmlns='http://www.w3.org/2005/Atom'>
<title>netbsd/tests/usr.bin/xlint/lint1/d_init_array_using_string.c, branch trunk</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: warn about extern declarations outside headers</title>
<updated>2023-03-28T14:44:34+00:00</updated>
<author>
<name>rillig</name>
<email>rillig@NetBSD.org</email>
</author>
<published>2023-03-28T14:44:34+00:00</published>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/commit/?id=ea64962370dcb8ab0cef70a139b7d17a37ec97cd'/>
<id>ea64962370dcb8ab0cef70a139b7d17a37ec97cd</id>
<content type='text'>
https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html</pre>
</div>
</content>
</entry>
<entry>
<title>lint: add quotes around placeholders for the remaining messages</title>
<updated>2022-06-22T19:23:17+00:00</updated>
<author>
<name>rillig</name>
<email>rillig@NetBSD.org</email>
</author>
<published>2022-06-22T19:23:17+00:00</published>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/commit/?id=884b0e6acbba8fb34c734c460ddbcf869dd14231'/>
<id>884b0e6acbba8fb34c734c460ddbcf869dd14231</id>
<content type='text'>
Reword some of the messages slightly, exchanging brevity for clarity.

Message 138 is kept as-is, as it is not yet covered by any tests.

Message 240 is kep as-is, as it is unreachable.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reword some of the messages slightly, exchanging brevity for clarity.

Message 138 is kept as-is, as it is not yet covered by any tests.

Message 240 is kep as-is, as it is unreachable.</pre>
</div>
</content>
</entry>
<entry>
<title>tests/lint: make 'expect+-' comments stricter</title>
<updated>2022-06-17T18:54:53+00:00</updated>
<author>
<name>rillig</name>
<email>rillig@NetBSD.org</email>
</author>
<published>2022-06-17T18:54:53+00:00</published>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/commit/?id=53ed6e86bd6a3ed261c76a96cddd65065362a5c7'/>
<id>53ed6e86bd6a3ed261c76a96cddd65065362a5c7</id>
<content type='text'>
Previously, the expectations from these comments were already satisfied
if the expectation occurred somewhere in the actual message from lint.
This meant that the prefix 'error:' or 'warning:' could be omitted from
the 'expect' comment.  These omissions were hard to see in a manual
review.  Now any omissions must be visually marked with '...'.

The test msg_342 now reports its messages properly as being in the file
msg_342.c, rather than msg_341.c.  This had been a copy-and-paste
mistake.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously, the expectations from these comments were already satisfied
if the expectation occurred somewhere in the actual message from lint.
This meant that the prefix 'error:' or 'warning:' could be omitted from
the 'expect' comment.  These omissions were hard to see in a manual
review.  Now any omissions must be visually marked with '...'.

The test msg_342 now reports its messages properly as being in the file
msg_342.c, rather than msg_341.c.  This had been a copy-and-paste
mistake.</pre>
</div>
</content>
</entry>
<entry>
<title>tests/lint: expect complete messages in feature tests</title>
<updated>2022-01-15T14:22:03+00:00</updated>
<author>
<name>rillig</name>
<email>rillig@NetBSD.org</email>
</author>
<published>2022-01-15T14:22:03+00:00</published>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/commit/?id=7cdb34758f6be65c5d5efe23a7c4edb7f125f701'/>
<id>7cdb34758f6be65c5d5efe23a7c4edb7f125f701</id>
<content type='text'>
Previously, the tests contained many comments like /* expect: 123 */,
which were useless to a casual reader since nobody is expected to learn
lint's message IDs by heart.  Replace these with the complete
diagnostics, to show what lint is complaining about.

The tests named msg_*.c have been left unmodified since they mention the
full message text in their header comment.

No functional change.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously, the tests contained many comments like /* expect: 123 */,
which were useless to a casual reader since nobody is expected to learn
lint's message IDs by heart.  Replace these with the complete
diagnostics, to show what lint is complaining about.

The tests named msg_*.c have been left unmodified since they mention the
full message text in their header comment.

No functional change.</pre>
</div>
</content>
</entry>
<entry>
<title>tests/lint: fix space-tab indentation</title>
<updated>2021-12-22T14:11:14+00:00</updated>
<author>
<name>rillig</name>
<email>rillig@NetBSD.org</email>
</author>
<published>2021-12-22T14:11:14+00:00</published>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/commit/?id=7e4610becd7903d0bbc8e27befbe548ae0308129'/>
<id>7e4610becd7903d0bbc8e27befbe548ae0308129</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 handling of initializations</title>
<updated>2021-12-22T00:45:53+00:00</updated>
<author>
<name>rillig</name>
<email>rillig@NetBSD.org</email>
</author>
<published>2021-12-22T00:45:53+00:00</published>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/commit/?id=04bc86f51c5291c8d6e4b32006fc44306362f0d4'/>
<id>04bc86f51c5291c8d6e4b32006fc44306362f0d4</id>
<content type='text'>
The implementation from March 2021 added proper support for designators
but didn't model the brace levels correctly.  In particular, it could
not handle additional braces or omitted braces.  In such a case, lint
skipped the remaining initializers from the initialization.  Due to
this, type errors in the remaining initializers went unnoticed.  Another
effect was that arrays of unknown size were wrongly reported as having
size 0.

Both GCC and Clang recommend placing braces around each sub-type that is
initialized, such as a struct, union or array.  Postfix does not follow
these recommendations, therefore lint had to be disabled in
external/ibm-public/postfix/Makefile.inc.  This commit fixes the bugs
mentioned there.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The implementation from March 2021 added proper support for designators
but didn't model the brace levels correctly.  In particular, it could
not handle additional braces or omitted braces.  In such a case, lint
skipped the remaining initializers from the initialization.  Due to
this, type errors in the remaining initializers went unnoticed.  Another
effect was that arrays of unknown size were wrongly reported as having
size 0.

Both GCC and Clang recommend placing braces around each sub-type that is
initialized, such as a struct, union or array.  Postfix does not follow
these recommendations, therefore lint had to be disabled in
external/ibm-public/postfix/Makefile.inc.  This commit fixes the bugs
mentioned there.</pre>
</div>
</content>
</entry>
<entry>
<title>lint: reword message 187 about too long string literal for initializer</title>
<updated>2021-12-21T22:21:11+00:00</updated>
<author>
<name>rillig</name>
<email>rillig@NetBSD.org</email>
</author>
<published>2021-12-21T22:21:11+00:00</published>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/commit/?id=e8f5207ab8de498008c312637a8e28a1a26b0f4c'/>
<id>e8f5207ab8de498008c312637a8e28a1a26b0f4c</id>
<content type='text'>
The previous message was imprecise in that it didn't distinguish between
non-terminating and terminating null bytes.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The previous message was imprecise in that it didn't distinguish between
non-terminating and terminating null bytes.</pre>
</div>
</content>
</entry>
<entry>
<title>lint: replace space followed by tab with simply tab</title>
<updated>2021-09-10T20:02:50+00:00</updated>
<author>
<name>rillig</name>
<email>rillig@NetBSD.org</email>
</author>
<published>2021-09-10T20:02:50+00:00</published>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/commit/?id=4ed562be3bd94ba6638e732781190045698ac8e7'/>
<id>4ed562be3bd94ba6638e732781190045698ac8e7</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: use standard quoting style for messages 124 and 184</title>
<updated>2021-08-14T13:00:55+00:00</updated>
<author>
<name>rillig</name>
<email>rillig@NetBSD.org</email>
</author>
<published>2021-08-14T13:00:55+00:00</published>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/commit/?id=a2e7345421257ef7e41a4edd18e43fee9d7093c1'/>
<id>a2e7345421257ef7e41a4edd18e43fee9d7093c1</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
