Commit Graph

301984 Commits

Author SHA1 Message Date
rillig 5a11074ff1 lint: clean up code related to lint comments
Remove type information from variable names, as the word 'flag' did not
indicate that the variables were negated.

Remove contradicting comments. Suppressing a warning for 'this line',
'this and the following line' and 'this statement or declaration' cannot
all be accurate at the same time.
2023-07-13 06:41:27 +00:00
rillig e2e148694e lint: reduce runtime relocations 2023-07-12 20:13:28 +00:00
rillig 4c5b7ccca2 lint: clean up handling of __real__ and __imag__
These two operatos are not binary, therefore they don't need a right
operand.  The questionable operands were a copy-and-paste mistake, as
the code was taken from the ++ and -- operands (tree.c 1.46 from
2008-04-25).  The ++ and -- operands aren't binary either, but since
lint represents address calculations in their premultiplied form, the
expression ptr++ contains a hidden right operand specifying the number
of bytes by which to increment the pointer.

Creating an integer-constant-expression node with type 'long double'
didn't make sense either.  Luckily, these expressions are only built but
not analyzed any further.
2023-07-12 19:34:01 +00:00
rillig bc10e9be9d lint: reject _Noreturn if it occurs in invalid places
C11 introduced _Noreturn as a function-specifier, not as a type
attribute.  The latter may occur in more places.
2023-07-12 18:26:04 +00:00
rillig 5e96f60f79 tests/lint: add test for _Noreturn from C11 2023-07-12 18:13:39 +00:00
gutteridge d824e196a4 CHANGES.prev: correct date entries for a few items 2023-07-12 16:07:52 +00:00
rillig 154c80952b lint: don't treat 'inline' as a storage class
The additional conflict in the grammar is in the same place as the other
conflicts, as T_SCLASS and T_FUNCTION_SPECIFIER are now separate tokens.

No functional change.
2023-07-12 16:07:35 +00:00
rillig 33d124e74f lint: indent grammar using tabs instead of spaces
Manually indenting the grammar rules using two spaces was too
cumbersome.
2023-07-12 13:00:09 +00:00
riastradh 8b1de3a2b9 ddb: Cast pointer to uintptr_t, then to db_expr_t.
Avoids warnings about conversion between pointer and integer of
different size on some architectures.
2023-07-12 12:50:46 +00:00
riastradh a884545629 machine/mutex.h: Sprinkle sys/types.h, omit machine/lock.h.
Turns out machine/lock.h is not needed for __cpu_simple_lock_t, which
always comes from sys/types.h.  And, really, sys/types.h (or at least
sys/stdint.h) is needed for uintN_t and uintptr_t.
2023-07-12 12:50:12 +00:00
rillig 3a1131e8fe lint: condense keyword table
This prepares for modelling 'inline' not as a storage class, but more
correctly as a function specifier.
2023-07-12 10:08:11 +00:00
mrg 84b8145c41 don't force gnu++98 here.
fixes build issues seen with GCC 10.5, as well as hopefully ones reported
by Andrew Cagney on current-users.
2023-07-12 07:35:15 +00:00
mrg d86bea6109 fix hppa and vax builds.
machine/lock.h isn't necessary for __cpu_simple_lock_t, it's in
sys/types.h.  avoids cpu_data.h vs sched.h include order issues.

move the hppa ipl_t typedef with the moved usage of it.
2023-07-12 06:45:24 +00:00
mlelstv bcb8f4b0a3 Make inclusion of sys/intr.h explicit for spl*. 2023-07-12 05:16:42 +00:00
christos 20b12e119e Move the rnd_add_uint32 outside the lock and get rid of dk_done1() suggested
by riastradh@
2023-07-11 23:26:41 +00:00
rillig 3ab2584819 lint: rename grammar rules to align with C23 2023-07-11 21:13:36 +00:00
rillig 032c24b4d9 lint: update wording in diagnostic for C99 2023-07-11 20:54:23 +00:00
mrg 1b78493458 bump gcc 10 version. 2023-07-11 18:13:27 +00:00
riastradh 200177ce3f mac68k/intr.h: Expose ipl_cookie_t to _KMEMUSER for crash(8). 2023-07-11 17:55:04 +00:00
riastradh c17be1e6bf hp300/intr.h: Put most of this under #ifdef _KERNEL.
Only ipl_cookie_t really needs to be exposed now, for crash(8).
2023-07-11 17:54:54 +00:00
rillig a5cf1c53b9 lint: in debug mode, don't generate empty message texts
Most of these messages have an /* unused */ comment in err.c, but some
don't.
2023-07-11 17:33:45 +00:00
martin e36df1e8e8 Replace kmutex_t * (which may be undefined here) with struct kmutex *,
suggested by Taylor.
2023-07-11 17:03:16 +00:00
martin a2f264d2db Belatedly add an entry for the openssl version switch - it may cause
subtle test failures after update builds (files with same installed
name created from different sources depending on openssl version).
2023-07-11 15:05:17 +00:00
martin 1da4bdf9dd Explicitly include <sys/mutex.h> for kmutex_t. 2023-07-11 14:57:21 +00:00
martin 50bc70f26c fix editor mishap in previous 2023-07-11 13:10:08 +00:00
martin dedfac2c7a Make ipl_cookie_t visible for _KMEMUSER userland applications. 2023-07-11 13:06:23 +00:00
riastradh 77eca60f10 x68k/intr.h: Put functions under _KERNEL so crash(8) can use this. 2023-07-11 11:50:39 +00:00
riastradh d6643ee5fc vax/intr.h: Expose ipl_cookie_t to _KMEMUSER for crash(8). 2023-07-11 11:48:45 +00:00
riastradh ff1a985cf9 sun68k/intr.h: Expose ipl_cookie_t to _KMEMUSER for crash(8). 2023-07-11 11:46:38 +00:00
riastradh 951cbbd667 sys/ksem.h: Hack around fstat(8) abuse of _KERNEL. 2023-07-11 11:37:29 +00:00
riastradh b5762f2f91 next68k/intr.h: Expose ipl_cookie_t to _KMEMUSER for crash(8). 2023-07-11 11:13:32 +00:00
riastradh 593fe2f576 news68k/intr.h: Fix includes. Put some definitions under _KERNEL. 2023-07-11 11:09:13 +00:00
riastradh e64c5901b7 mvme68k/intr.h: Expose ipl_cookie_t to _KMEMUSER for crash(8). 2023-07-11 11:07:54 +00:00
riastradh 6938cca6de luna68k/intr.h: Expose ipl_cookie_t to _KMEMUSER for crash(8). 2023-07-11 11:06:04 +00:00
riastradh 5ef555d76e hppa/intr.h: Expose ipl_cookie_t to _KMEMUSER for crash(8). 2023-07-11 11:05:09 +00:00
riastradh e000c055ec ddb: Cast pointer to uintptr_t first before db_expr_t. 2023-07-11 11:03:31 +00:00
martin 76dba7a07f Move the definition of ipl_cookie_t out of the kernel-only sections,
some _KMEMUSER applications need it.
2023-07-11 11:02:07 +00:00
riastradh 07938a37a4 arm/cpu.h: Need sys/param.h for COHERENCY_UNIT.
Nix machine/param.h -- not meant to be used directly, pulled in by
sys/param.h.
2023-07-11 11:01:18 +00:00
riastradh 4c783bd478 atari/intr.h: Expose ipl_cookie_t with _KMEMUSER for crash(8). 2023-07-11 10:58:03 +00:00
riastradh 116e826d4c cesfic/intr.h: Expose ipl_cookie_t to userland only with _KMEMUSER.
Probably not necessary but let's be a little more cautious about
this.
2023-07-11 10:55:02 +00:00
riastradh 1a13c0c572 cesfic/intr.h: Expose ipl_cookie_t to userland for crash(8). 2023-07-11 10:47:24 +00:00
riastradh 1522ead6e2 amiga/intr.h: Don't define spl*() functions if !_KERNEL.
This is used by crash(8) now, and what's important is ipl_cookie_t.
2023-07-11 10:44:55 +00:00
riastradh 6f9f802778 linux/idr.h: Need <sys/mutex.h> for kmutex_t. 2023-07-11 10:42:36 +00:00
riastradh 7e975833bc hp300/intr.h: Fix missing includes. 2023-07-11 10:42:26 +00:00
riastradh c878e587ac opencrypto/cryptodev.h: Fix includes.
- Move sys/condvar.h under #ifdef _KERNEL.
- Add some other necessary includes and forward declarations.
- Sort.
2023-07-11 10:42:16 +00:00
riastradh daaf4f270a evbarm/intr.h: Define ipl_cookie_t before including ARM_INTR_IMPL.
Otherwise arm/mutex.h doesn't work, due to a cyclic dependency which
should really be fixed.
2023-07-11 10:42:07 +00:00
riastradh 8e873bfee1 arm/mutex.h: Need machine/intr.h, machine/lock.h.
For ipl_cookie_t and __cpu_simple_lock_t.
2023-07-11 10:41:58 +00:00
riastradh 3e51e50883 sys: Rip <sys/resourcevar.h> out of <uvm/uvm_param.h>.
And thus out of <sys/param.h>, which is exceedingly overused and
fragile and delenda est.

Should fix (some) issues with the recent inclusion of machine/lock.h
in various machine/mutex.h files.
2023-07-11 09:48:56 +00:00
martin d7dc966c96 Include psl.h for ipl_cookie_t if __MUTEX_PRIVATE 2023-07-11 09:34:34 +00:00
mrg ebba80dab5 mknative-gcc for GCC 10.5.0. 2023-07-11 06:05:43 +00:00