It seems that alarm(1) is not enough time for the thread to actually exit after quittingtime = 1.
It randomly failed with "Test program received signal 14" on a slow environment.
fixes. Also, default all tests to using UTF8 instead of doing a special
dance for the wide character tests and fix debug_test to force set the
locale to UTF8 so tests under debug don't throw spurious mismatches
when a wide character test is run.
This warning flags the second semicolon of 'return;;' as being
unreachable. It does not warn about these superfluous semicolons in
general though.
Seen in usr.bin/make/bmake_malloc.c.
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.
For the result of the comma operator, it doesn't matter whether the
comma itself comes from a system header or not. Instead, it's the main
operator of the right operand.
Since 2021-11-16.
Rename 'struct kwtab' to 'struct keyword' since a single keyword is not
a whole keyword table.
Sync comment for lex_name with reality: sbuf_t no longer contains the
hash value.
Remove redundant tests for EOF, as EOF is neither a space nor a digit
nor an xdigit.
No functional change.
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.
The newly added tests triggered the assertion in begin_designation since
for incomplete types the initialization is stopped before handling the
first brace.
History of the new test fragment:
libexec/2021.09.14.19.44.40-plain/lint1
| (14): error: cannot initialize 'struct typedef histogram_entry'
| from 'pointer to char' [185]
| exit status 1
libexec/2021.04.01.14.20.30-plain/lint1
libexec/2021.03.30.20.23.30-plain/lint1
| (14): error: cannot initialize 'struct typedef histogram_entry'
| from 'pointer to char' [185]
| (14): error: cannot initialize 'struct typedef histogram_entry'
| from 'int' [185]
| (15): error: cannot initialize 'struct typedef histogram_entry'
| from 'pointer to char' [185]
| (15): error: cannot initialize 'struct typedef histogram_entry'
| from 'int' [185]
| exit status 1
libexec/2021.03.30.14.25.28-plain/lint1
libexec/2021.03.29.21.34.17-plain/lint1
| (15): error: too many struct/union initializers [172]
| exit status 1
libexec/2021.03.28.15.36.37-plain/lint1
libexec/2021.03.28.14.13.18-plain/lint1
| (18): error: too many struct/union initializers [172]
| exit status 1
libexec/2021.03.21.20.44.59-plain/lint1
libexec/2021.03.21.20.30.19-plain/lint1
| (18): too many struct/union initializers [172]
| exit status 1
libexec/2014.11.20.20.49.06-plain/lint1
libexec/2014.11.20.20.48.33-plain/lint1
| exit status 0
In tree.c 1.385 from 2021-10-09, the format of the message changed. The
test for platforms where char is unsigned was not updated in that commit
because I had forgotten about it, and because lint1/check-msgs.lua only
checks the message in tests named exacty msg_000.c, but not msg_000_*.c.
Found by martin@.
isQEMU_TCG() should return false. Fixes multiple test cases that were
failing with "Test case was expecting a failure but none were raised"
on that platform.