Commit Graph

286521 Commits

Author SHA1 Message Date
rillig
c6daba3cac tests/lint: add comma to struct initialization
This places the error marker one line up, where it is expected.
2021-03-19 17:40:37 +00:00
rillig
a8fb7d4818 lint: rename designator_pop_name to designator_shift_name
The entries are removed from the beginning, not from the end.

No functional change.
2021-03-19 17:37:57 +00:00
jmcneill
bdf24698dc earlyconsgetc: return -1 instead of 0 because we will never produce input 2021-03-19 10:23:34 +00:00
rillig
4c27df2433 lint: use standard form of statement macro for debug_node
No functional change.
2021-03-19 08:23:39 +00:00
rillig
5acb533d3d lint: rename in_bit to in_bits
No functional change.
2021-03-19 08:21:26 +00:00
rillig
527774e33b lint: rename tsize to type_size_in_bits
The shorter name size_in_bits was already taken by the function-like
macro with argument type tspec_t.

No functional change.
2021-03-19 08:19:24 +00:00
rillig
91bffee2de tests/lint: add test for incompatible pointer types in return 2021-03-19 08:01:58 +00:00
rillig
19ff95ceea lint: add reminder that C99 does not allow '{}' in initializer
No functional change.
2021-03-19 07:54:13 +00:00
skrll
a99e7efc87 Support pmap_growkernel and KASAN shadow mapping of the new KVA.
Neither mips nor ppc booke actually use pmap_growkernel (at present).

Thanks to rin@ for testing a similar patch on ppc booke.
2021-03-19 07:51:33 +00:00
rillig
0b45cbea90 lint: replace assertion in initialization with proper error message 2021-03-19 01:02:52 +00:00
rillig
674baf6361 lint: rename push_member and pop_member
These two functions are supposed to model the designator that is used
for initializing structs and arrays.  The implementation is still buggy
and does not work at all for C99 designators with multiple names, see
d_init_pop_member.c.

For now, just rename the functions to head in the right direction.

No functional change.
2021-03-19 00:55:02 +00:00
simonb
7f74343bad Sprinkle a few more \n's and the end of some debug printfs. 2021-03-19 00:44:09 +00:00
rillig
bde88c228c lint: extend documentation about initialization
No functional change.
2021-03-19 00:39:17 +00:00
rillig
89239b6de5 lint: split initstack_pop_item into separate functions
No functional change.
2021-03-19 00:19:32 +00:00
rillig
e2bce8130d lint: improve debug logging in initstack_push
No functional change outside debug mode.
2021-03-19 00:08:13 +00:00
rillig
dc7202e285 lint: split initstack_push into smaller functions
No functional change.
2021-03-18 23:45:20 +00:00
rillig
d68805fd28 lint: clean up control flow in initstack_push
No functional change.
2021-03-18 23:37:31 +00:00
rillig
77fa05a23f lint: extract extend_if_array_of_unknown_size from initstack_push
No functional change.
2021-03-18 23:23:40 +00:00
simonb
2982f46e1a Add PTRACE_ILLEGAL_ASM using the MIPS32r6/MIPS64r6 backwards and
forwards compatible "sigrie" instruction to generate a Reserved
Instruction trap.
2021-03-18 23:18:36 +00:00
rillig
d30c5846db lint: replace undefined behavior during initialization with assertion
This only affects code that is already rejected by the compiler.
2021-03-18 22:51:32 +00:00
rillig
b4cc35448b lint: improve debug logging during initialization
No functional change outside debug mode.
2021-03-18 22:08:05 +00:00
rillig
5f25f85e8f lint: make the debug log for nodes more readable
The operator NAME has the name 'name', therefore no special case is
needed.

Having the words 'with type' in the message makes the message easier to
find from the debug log.  Given that the operator name is used unquoted,
the log message 'name: int value=111' was nearly impossible to find in
the code.

Replace the '()' with an actual word, to avoid any confusion about
whether the type name might be a function type without prototype.

Reduce the amount of '=' signs, instead use commas to separate the
properties of the node.

No functional change outside debug mode.
2021-03-18 22:05:33 +00:00
rillig
b1117d0cb9 lint: rename operator 'const' to 'constant'
The previous name could be too easily confused with the type qualifier
'const'.  The operator name is mainly used in the debug log, only
occasionally in the output.  Since 'constant' is not a "real" operator,
it probably doesn't occur in messages at all.
2021-03-18 21:56:34 +00:00
rillig
ebe3bde9bf lint: reword message about type mismatch in initialization
Using parentheses for quotes is unusual, furthermore the previous
message didn't follow proper grammar rules, sacrificing clarity for
brevity.
2021-03-18 21:26:56 +00:00
rillig
79d8eaa978 tests/lint: add test for type mismatch in initialization
Copied and adapted from d_c99_init.c.
2021-03-18 21:20:21 +00:00
rillig
d254ff0ed7 tests/lint: warning 210 has type information by now 2021-03-18 20:58:02 +00:00
rillig
e82f0a6950 lint: reduce debug logging for initialization, update documentation
No functional change outside debug mode.
2021-03-18 20:55:58 +00:00
rillig
ce64b8cc18 lint: document how initialization works, improve debug logging
No functional change outside debug mode.
2021-03-18 20:22:50 +00:00
rillig
0dfa224bf0 tests/lint: add more examples for initialization 2021-03-18 20:20:55 +00:00
cheusov
6e95ab06dc mtree: use POSIX type uint32_t instead of u_int32_t 2021-03-18 20:02:18 +00:00
cheusov
37e902b261 join.c: print usage after warning "illegal option..." as it was originally intended 2021-03-18 19:47:41 +00:00
cheusov
47b5db6ce5 join.c: explicitly convert -1 to u_long in order to fix compiler warnings 2021-03-18 19:41:54 +00:00
cheusov
61b08b6410 ipcs.c: do not #include sys/inttypes.h header which is not necessary 2021-03-18 19:34:05 +00:00
cheusov
93a814dc9d find: use POSIX strtoll(3) instead of legacy strtoq(3) 2021-03-18 18:24:14 +00:00
cheusov
4e50b167d1 find: use POSIX type uint32_t instead of u_int32_t 2021-03-18 18:21:18 +00:00
cheusov
0dc4923bc1 cksum: use POSIX type uint32_t instead of u_int32_t 2021-03-18 18:12:35 +00:00
rillig
1250e70dfe lint: document the initialization of an object in more detail
This will help fixing the bugs that are currently demonstrated in
msg_168.c and d_struct_init_nested.c.
2021-03-18 14:58:44 +00:00
nia
9e6dbce9f9 restore flags-as-bitmask, just in case another function is passing its
flags here.
2021-03-18 14:05:37 +00:00
nia
6f5e84c071 ts2timo(9): refactor TIMER_ABSTIME handling
- only use *start for output of the original time.
  for clarity purposes, use the temporary variable for everything else.
- add a check for integer underflow

Reported-by: syzbot+17b5072d5ed262a966d3@syzkaller.appspotmail.com
2021-03-18 14:01:18 +00:00
nia
a95db40612 revert previous 2021-03-18 13:45:15 +00:00
nia
355cbcb002 ts2timo(9): further deobfuscation.
we want to check against NULL, so use it, rather than some random value on
the stack
2021-03-18 12:37:51 +00:00
nia
73fcbb1b3b ts2timo(9): refactor for clarity
- 'flags' is not a boolean...
	- actually, it is, but it should simply be named "absolute".
	- convert tests for if (flags) to if (flags != TIMER_RELTIME)
- hoist function calls out of if expressions (requested by uwe)

still needs fixing:

- need to check for overflow before timespecsub.
2021-03-18 11:53:16 +00:00
nonaka
f6fba0ed7d LIR_HV priority should be lower than softint. 2021-03-18 01:50:12 +00:00
christos
ef57a5cc6b simplify expression, daemon is an array can't be NULL. 2021-03-18 01:49:09 +00:00
rillig
d8304c1dc3 lint: add debug logging for C99-style initialization of arrays
No functional change outside debug mode.
2021-03-17 15:45:30 +00:00
rillig
59329564e5 lint: move debug logging for the designator to the top of the code
The debugging code is needed by the soon-to-be-added proper handling of
array subscript initializers such as '.member[123].member = 12345'.

No functional change.
2021-03-17 15:37:42 +00:00
ryoon
eef08e1cec Improve URL consistency
Replace netbsd.org in URL with NetBSD.org and add www. to URL of web server.
2021-03-17 15:26:20 +00:00
rin
b42f375b12 Make this distinguishable with native PCI interrupt. 2021-03-17 14:58:16 +00:00
rin
ac5d131cb7 Switch to intr_establish_xname(). 2021-03-17 14:50:11 +00:00
nia
abfcffbda7 pci(4): many more drivers 2021-03-17 14:10:29 +00:00