The modifier ':C' did not need the modifier 'g', as there couldn't ever
be more than one match per word. Using the modifier ':from=to' is easier
to read.
Align the variable assignments. There was no point in having 3 different
alignment styles in the same file.
Remove underscore from .for iteration variable, as it is not needed.
No functional change.
The option -o must come before the first filename.
Now it is possible to lint kern_exec.c at least. The next failure is in
netbsd32_machdep.c:
netbsd32_machdep.c(395): error: illegal bit-field size: 255 [36]
That line in netbsd32_process_read_fpregs reads:
__CTASSERT(sizeof(*regs) == sizeof(struct save87));
This is probably a bug in lint. The struct save87 contains 3 uint16_t,
followed by a union containing a uint64_t, followed by a packed struct
with size 10. The combination of packed and padding is suspicious.
The syntax errors due to the __asm statements are now gone. The file
kern_exec.c only produces a few warnings now. But after running that
file through lint1, the main lint complains about wrong usage. This is
due to this call:
${LINT} ... -i $< -o $@
The main lint has never supported -o after the first filename, so it
complains. It would have been helpful if lint had given any hint as to
which option was invalid. Anyway, the next step is to reorder the
arguments. As it is now, the code can never have worked.
Due to the missing path, the following commands had failed:
$ cd src/sys/arch/amd64/compile/GENERIC
$ nbmake-amd64-lint kern_exec.ln
nbmake: don't know how to make kern/kern_exec.c. Stop
After fixing the path, "make kern_exec.ln" fails with:
sys/kern/kern_exec.c(65): error: syntax error '"' [249]
The affected line contains:
__KERNEL_RCSID(0, "...");
The macro __KERNEL_RCSID expands to __asm("some strings"). Since
KERNLINTFLAGS is missing the -g, lint does not recognize __asm as
keyword and tries to parse it as an identifier instead, expecting a
variable or function declaration.