Commit Graph

301746 Commits

Author SHA1 Message Date
rillig e50dbdf451 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
2023-06-30 21:06:18 +00:00
rillig 54af47c51a lint: replace macro for unique identifiers with function
No functional change.
2023-06-30 19:43:00 +00:00
rillig f6c9a3ff5c lint: clean up handling of declarations
No functional change.
2023-06-30 19:10:49 +00:00
rillig fc9c97fa4c tests/lint: extend tests for sizeof and alignof 2023-06-30 16:39:17 +00:00
rillig cb8166a1d1 lint: fix computation of bit-field width
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.
2023-06-30 15:19:09 +00:00
rillig 5c829ba167 lint: clean up packing of structs and unions
No functional change outside debug mode.
2023-06-30 14:39:23 +00:00
rillig 1033a23783 lint: clean up tree.c
No functional change.
2023-06-30 12:21:25 +00:00
rillig 9ae9809bbf lint: make alignof(incomplete enum) an error 2023-06-30 09:26:03 +00:00
rillig bf86468d4c tests/lint: add more tests for sizeof, offsetof, alignof 2023-06-30 09:21:52 +00:00
rillig 4b06b87ea3 lint: use NULL for null pointer constants
No binary change.
2023-06-30 08:48:38 +00:00
rillig 082684fd88 lint: add query for assigning an integer 0 to a pointer 2023-06-30 08:45:22 +00:00
rillig 7aaf3a0593 tests/lint: extend test for sizeof and offsetof 2023-06-30 08:03:01 +00:00
rillig 10704a6fff tests/lint: demonstrate bugs in anonymous struct/union handling 2023-06-30 07:18:02 +00:00
gutteridge 275519e238 PosixDaemon.c: restore NetBSD logging additions lost in merges
Restore part of local modifications r. 1.2 & 1.4 from tsarna@. One
aspect could not be carried forward, as Apple dropped the bug detection
query functionality that was formerly represented by the teststate
member of the DNSServer struct. Otherwise, reapplied almost verbatim,
except for minor consistency and style changes.

This was added again in part as an example should there be a need to
add further logging content for NetBSD's purposes. (DumpStateLog() has
changed further as of Apple's 1790.80.10 release, but should we roll
forward, our means here should still be viable.)
2023-06-30 02:03:58 +00:00
gutteridge 2bc969b373 PosixDaemon.c: convert tabs to spaces to match coding style
Match Apple's coding style for this project. (In part for those of us
who have tabs visually representing four spaces!)
2023-06-30 01:59:45 +00:00
gutteridge 5388ce56e6 Add npflog.4 to sets 2023-06-30 00:48:03 +00:00
gutteridge a1ca5a5447 prepare-import.sh: fix grammar in a comment 2023-06-29 23:59:43 +00:00
gutteridge 01c3b8a04d 3RDPARTY: note latest version of mDNSResponder 2023-06-29 23:52:50 +00:00
gutteridge c5615faf33 npflog.4: add and adjust some details
Add details about the header structure (though the if_npflog.h file is
not presently installed and has a _KERNEL guard). Also adjust some
sentences (requested by riastradh@), and include the original OpenBSD
RCS ID, since much of this content shares that origin.
2023-06-29 23:20:02 +00:00
rillig 742ee62757 lint: clean up member names of declaration levels
No functional change outside debug mode.
2023-06-29 22:52:44 +00:00
nia 3c60e71e80 ch-ch-changes 2023-06-29 21:46:47 +00:00
andvar 7281dd49bd s/determin /determine / in comment. 2023-06-29 21:01:21 +00:00
nia 7956bcaf80 aiomixer(1): Support the informal NO_COLOR standard.
When the NO_COLOR environment variable is set, no ANSI colours will
be displayed.

https://no-color.org/
2023-06-29 19:06:54 +00:00
riastradh d378359a95 vis(3): Avoid nonportable MIN in portable code. 2023-06-29 16:11:31 +00:00
manu 2035893213 Primary bootstrap is now able to read a GPT inside RAIDframe.
Previously, primary bootstrap was able to boot on RAID-1 RAIDframe set
with the limitation that the FFS filesystem had to start at bloc 0 in the
RAID. That allowed inner RAID partitionning with a disklabel, but not with
a GPT.

When booting on a RAID-1 RAIDframe, primary bootstrap now first try a
filesystem at bloc 0 of the RAID as before. On failure, it tries to
read a GPT and load secondary bootstrap from, by priority;
1) the first partition with the bootme attribute set
2) the first partition of type FFS, LFS, CCD or CGD
3) the first partition present in the GPT
2023-06-29 14:18:58 +00:00
rillig 8744a961da lint: use standard terminology for bit-field width
No functional change.
2023-06-29 12:52:06 +00:00
rillig a0a9ca021c lint: clean up initialization of type properties
No functional change.
2023-06-29 10:31:32 +00:00
rillig 0d2b0d606f lint: clean up function names
No functional change.
2023-06-29 09:58:36 +00:00
rillig 7d05a54d9c lint: enhance debug output for diagnostics
Only print the debug message if the diagnostic is active, which is
relevant for c99ism, c11ism and gnuism.

Print more details about the diagnostic or query.
2023-06-29 05:47:41 +00:00
rillig 57e28d6fdc lint: clean up completion of struct, union and enum declarations
No functional change.
2023-06-29 05:03:03 +00:00
kre 3afd71f9e9 Avoid comparing signed and unsigned values (using signed here seems
safer than the usual unsigned when this happens).   Might fix build.
2023-06-29 01:30:31 +00:00
wiz 6f6fb001c9 tmux: also set HAVE_REALLOCARRAY 2023-06-28 22:47:39 +00:00
wiz 0596a50f72 doc: note import of tmux 3.3a 2023-06-28 22:24:15 +00:00
wiz f1454f1d67 update build system for tmux 3.3a 2023-06-28 22:21:48 +00:00
wiz 46548964d2 merge tmux 3.3a 2023-06-28 22:21:26 +00:00
wiz 6db2675718 Import original sources for tmux 3.3a. 2023-06-28 22:10:15 +00:00
rillig aca02333cc tests/lint: demonstrate wrong size calculation in anonymous union 2023-06-28 21:41:27 +00:00
rillig 87eefb9092 tests/lint: do not overwrite expected files that only differ in spaces 2023-06-28 20:51:31 +00:00
rillig 15b1ffda11 tests/lint: fix preprocessor line number validation
When running the tests via ATF, the filename was an absolute filename,
while the preprocessing line in the test file uses a relative filename.
These two didn't match.
2023-06-28 17:53:21 +00:00
rillig b6d101e5c9 tests/lint: demonstrate wrong handling of nested initializer
Seen in external/bsd/jemalloc/dist/src/jemalloc.c, init_lock.
2023-06-28 15:04:07 +00:00
rillig 41819645e0 lint: allow to keep the preprocessor output on success as well 2023-06-28 13:50:47 +00:00
macallan fd3eba58b3 following a hunch...
- cache DEC and FG registers, only write them if the value actually changes
- wait for the engine to go idle before writing DEC
- wait for FIFO slots on everything else
with this we avoid waiting if possible and still avoid overlapping blit and
fill commands
2023-06-28 11:08:47 +00:00
rillig 86d9dbede8 tests/lint: use standard form of ATF tests, test removing output file 2023-06-28 09:35:42 +00:00
macallan 3fd25b55aa wait for the engine to go idle before issuing rectfill commands
we get occasional overlap with blit commands if we just wait for fifo slots
needs further investigation, it is possible that not all writes to drawing
engine registers are pipelined and of course we don't have docs
2023-06-28 08:53:43 +00:00
macallan 68cb2b0683 fix tpyo - now the glyph cache can actually work... 2023-06-28 08:11:52 +00:00
rillig c37b4231bc tests/make: extend test for the 'empty' function in conditions 2023-06-28 06:15:42 +00:00
rillig acb8ae43d7 make.1: clean up wording, clarify scope of '!' in conditions 2023-06-28 06:15:07 +00:00
nisimura f98f9050a0 correct register function annotation as it's for receive coalesce. 2023-06-27 21:43:58 +00:00
andvar 0aa2b64219 remove double/tripple o in comments, where it likely was not added on purpose. 2023-06-27 19:30:27 +00:00
roy 5462b98306 Note update to openresolv-3.13.2 2023-06-27 17:10:15 +00:00