The NetBSD Project

CVS log for src/tests/usr.bin/xlint/lint1/init_braces.c

[BACK] Up to [cvs.NetBSD.org] / src / tests / usr.bin / xlint / lint1

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.9 / (download) - annotate - [select for diffs], Fri Jul 21 06:02:07 2023 UTC (7 months, 1 week ago) by rillig
Branch: MAIN
CVS Tags: HEAD
Changes since 1.8: +2 -2 lines
Diff to previous 1.8 (colored)

lint: reword message about non-constant initializer

Revision 1.8 / (download) - annotate - [select for diffs], Fri Jul 7 19:45:22 2023 UTC (7 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.7: +3 -1 lines
Diff to previous 1.7 (colored)

lint: warn about function definitions without header declaration

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.

Revision 1.7 / (download) - annotate - [select for diffs], Sat Jul 1 06:09:24 2023 UTC (7 months, 4 weeks ago) by rillig
Branch: MAIN
Changes since 1.6: +3 -4 lines
Diff to previous 1.6 (colored)

lint: fix initialization of unnamed union member

Revision 1.6 / (download) - annotate - [select for diffs], Fri Jun 30 22:27:47 2023 UTC (7 months, 4 weeks ago) by rillig
Branch: MAIN
Changes since 1.5: +36 -1 lines
Diff to previous 1.5 (colored)

tests/lint: test initializing an unnamed union

Revision 1.5 / (download) - annotate - [select for diffs], Fri Jun 30 21:06:18 2023 UTC (7 months, 4 weeks ago) by rillig
Branch: MAIN
Changes since 1.4: +1 -3 lines
Diff to previous 1.4 (colored)

lint: fix handling of unnamed struct/union members

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

Revision 1.4 / (download) - annotate - [select for diffs], Fri Jun 30 09:21:52 2023 UTC (7 months, 4 weeks ago) by rillig
Branch: MAIN
Changes since 1.3: +5 -4 lines
Diff to previous 1.3 (colored)

tests/lint: add more tests for sizeof, offsetof, alignof

Revision 1.3 / (download) - annotate - [select for diffs], Wed Jun 28 15:04:07 2023 UTC (8 months ago) by rillig
Branch: MAIN
Changes since 1.2: +39 -3 lines
Diff to previous 1.2 (colored)

tests/lint: demonstrate wrong handling of nested initializer

Seen in external/bsd/jemalloc/dist/src/jemalloc.c, init_lock.

Revision 1.2 / (download) - annotate - [select for diffs], Wed Jun 22 19:23:18 2022 UTC (20 months ago) by rillig
Branch: MAIN
CVS Tags: netbsd-10-base, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1, netbsd-10
Changes since 1.1: +5 -5 lines
Diff to previous 1.1 (colored)

lint: add quotes around placeholders for the remaining messages

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.

Revision 1.1 / (download) - annotate - [select for diffs], Mon Dec 20 19:48:05 2021 UTC (2 years, 2 months ago) by rillig
Branch: MAIN

tests/lint: test excess braces around initializers

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




CVSweb <webmaster@jp.NetBSD.org>