Commit Graph

296422 Commits

Author SHA1 Message Date
rillig 5685a50629 gomoku: reduce number of variables in update_overlap
No functional change.
2022-05-28 05:14:34 +00:00
rillig a94d789129 gomoku: reduce scope of local variable
No functional change.
2022-05-28 04:52:23 +00:00
manu 8139545e40 Let radeon DRM driver build on ports that lack ACPI 2022-05-28 01:07:47 +00:00
manu f4eefcd125 Document hw.wmX.txex_workqueue sysctl 2022-05-28 00:53:41 +00:00
rillig 256d3e3c22 gomoku: reduce variable reuse, make code more uniform
No functional change.
2022-05-27 23:29:15 +00:00
rillig 4a862cfde5 gomoku: reduce scope of local variables
No binary change.
2022-05-27 23:10:54 +00:00
wiz e4353e34a7 gcc 9.5.0 out. 2022-05-27 21:43:26 +00:00
riastradh 1f828ecfda i915: Fix missing newlines in custom warning message macros. 2022-05-27 21:02:27 +00:00
rillig 32465329f0 gomoku: allow Black to win the game in the very last move 2022-05-27 20:48:42 +00:00
rillig 9aebef9fb0 gomoku: fix off-by-one error when deciding that the game is a tie 2022-05-27 20:35:58 +00:00
rillig 42e4930deb gomoku: replace 1-based movenum with 0-based nmoves
No functional change, not even the TIE that is wrongly announced when
the very last spot on the board is yet to be filled by Black.  Even
without this off-by-one error, it could be that filling the very last
spot completes a frame, so that code has been wrong all the time.

In practical terms, this situation only arises when the human player is
unconcentrated or the computer player has a bad strategy.  The latter
may well be, as the computer moves in the (boring) endgame are not
directed towards winning -- they fill irrelevant spots before relevant
ones.
2022-05-27 19:59:56 +00:00
rillig 267ff9487f gomoku: split local variable into separate variables
No binary change.
2022-05-27 19:30:56 +00:00
bouyer 1c9172513d xenevt_setipending(): also increase xenevt_ih->ih_pending, so that
the handler will be called when the IPL is lowered.
2022-05-27 18:35:38 +00:00
nia fb225dba9f ctwmrc: Use a slightly more muted orange color. 2022-05-27 17:04:16 +00:00
tsutsui 04447eb59d Specify -fno-unwind-tables to shrink binaries. 2022-05-27 16:59:19 +00:00
nia 87004fdf99 ... and more MKLFS here 2022-05-27 09:25:39 +00:00
nia a615e3f3ee Document MKLFS 2022-05-27 09:25:08 +00:00
nia cbb875961a mk: Add a MKLFS flag for excluding the log-structured filesystem userspace
tools from the build.
2022-05-27 07:28:20 +00:00
rillig 65a67c044c lint: do not warn about 'uint32_t = uint64_t >> 32'
If all possible values fit into the destination type, there is no
possibility of losing accuracy.

Enhances PR 36668.
2022-05-26 20:17:40 +00:00
rillig 77552b5db4 tests/lint: demonstrate wrong warnings about loss of accuracy 2022-05-26 19:55:57 +00:00
rillig 3ccd06c03d lint: do not pre-multiply pointer expressions 'ptr + int'
In the AST, it is confusing to see that 'stderr == __sF + 304', it
should rather be 'stderr == __sF + 2'.

No functional change.
2022-05-26 18:08:33 +00:00
rillig 5c0953e76a lint: improve local variable and function names
No functional change.
2022-05-26 17:23:09 +00:00
ryo a20a691144 In ddb, fixed "trace/u" and user process memory read/write to work correctly.
In the softint context, curlwp points the kernel lwp, so to get the pmap
of a user process, we had to use curcpu()->ci_onproc->l_proc instead of
curproc (curlwp->l_proc). Adviced by ad@.
2022-05-26 17:11:05 +00:00
rillig 29e65980fe lint: reduce scope of local variables in build_plus_minus
No functional change.
2022-05-26 16:52:30 +00:00
rillig 15123c981e lint: fix spacing and line breaks in debug logging
The spacing between function arguments in a declaration info was too
big, it was the indentation level instead of a single space.

The function debug_sym is used for two purposes: own-line and in-line,
which coincidentally are distinguished by whether the suffix string is
"\n".
2022-05-26 16:45:25 +00:00
rillig 2e0e5732c1 libc/ptree: remove CONSTCOND comments
Since 2021-01-31, lint does not need them anymore.
2022-05-26 15:23:33 +00:00
tsutsui 031d84ccba Remove duplicated function declarations. 2022-05-26 15:05:11 +00:00
rillig 8c8a5f1d5e altq.9: remove CONSTCOND comment from example code
Since 2021-01-31, lint no longer needs CONSTCOND in a do-while loop.
2022-05-26 14:39:30 +00:00
tsutsui 623e78a603 Explicitly include "ioconf.h" for struct cfdriver. 2022-05-26 14:33:29 +00:00
tsutsui 23f2724943 KNF a bit. 2022-05-26 14:30:36 +00:00
tsutsui 3bb8379fc9 Make a readonly array const. 2022-05-26 14:30:11 +00:00
tsutsui be6085933f Make readonly keymap data const. 2022-05-26 14:28:56 +00:00
tsutsui 108776090a Make local functions and variable static. 2022-05-26 14:27:43 +00:00
uwe 6fc03f836d mk.conf(5): Don't make "experimental" comment stand out. 2022-05-26 14:24:42 +00:00
rillig d1b9a5badf lint: rename olwarn and LWARN_BAD to be more expressive
No functional change.
2022-05-26 13:40:49 +00:00
msaitoh 330377f934 Use CPUID_PERF_* macros defined in specialreg.h. No functional change. 2022-05-26 13:02:04 +00:00
rillig 6f91ba54b7 lint: merge debug and non-debug code for saving and restoring warnings
No functional change.
2022-05-26 12:47:20 +00:00
rillig 13f4c64bc8 lint: remove assertion about saving and restoring warning flags
The assertion only triggers in debug mode, which is generally not used
as it adds lots of debug logging.  In production mode, the assumption
didn't hold for many years now, so remove the assertion.
2022-05-26 12:27:25 +00:00
rillig 7a99d9d033 lint: improve debug logging for NAME expressions
In a NAME expression, the name is an essential part, so put it to the
front, in natural reading order.
2022-05-26 12:04:56 +00:00
rillig 30a2cf22a3 lint: add missing newlines in debug_node 2022-05-26 11:54:33 +00:00
bouyer e0ffc84538 aprint_debug(): if a hypercall fail, print the return code. 2022-05-26 11:06:14 +00:00
rillig 1241cc0fce lint: re-order conditions for lossy conversions
Now that can_represent does more work, put it at the end of the
conditions.

No functional change.
2022-05-26 10:48:47 +00:00
rillig 4157145332 sys/common_int_const.h: fix typo in error message 2022-05-26 09:55:31 +00:00
rillig b3f015e173 lint: do not warn about loss in accuracy if the actual value fits
The expression 'any & 0xff' can always be assigned to 'uint8_t' without
loss of any value bits.  In the same way, '(any & 0xff) << 8' can always
be assigned to 'uint16_t'.

Previously, lint warned about these cases.  Fix these wrong warnings by
tracking the possible values of integer expressions across a single
expression.

Fixes PR 36668, so that <sys/endian.h> does not need to be cluttered
with useless casts anymore.
2022-05-26 09:26:00 +00:00
mlelstv d34fb3e756 Literal backslashes need to be quoted for roff. 2022-05-26 08:06:58 +00:00
rillig 975e35506f tests/lint: demonstrate wrong 'may lose accuracy' warning
Reported in PR 36668, fixed in sys/sys/endian.h 1.26 from 2007-07-20,
unfixed in sys/sys/endian.h 1.29 from 2014-03-18.
2022-05-26 07:03:03 +00:00
wiz fa370be1c7 w: add -A to usage 2022-05-26 06:48:36 +00:00
rillig da0f3f0c65 lint: remove long list of node types in switch statement
No functional change.
2022-05-26 06:43:58 +00:00
nia 9cd34def66 Document some more build options. Delint. 2022-05-26 06:33:03 +00:00
nia 104d7d0ec7 mk: Document that some options were enabled by default on aarch64 2022-05-26 06:23:57 +00:00