Commit Graph

20931 Commits

Author SHA1 Message Date
kre 7724ab9123 Properly implement the POSIX format -d option.
Previously we have hacked that using parsedate(3) - but parsedate()
returns a time_t and consequently while it "handles" fractional seconds,
all that meant (all it really can mean) is that they're ignored.

The POSIX spec expects that (at least if the filesystem supports them)
fractional seconds can be set using the -d option.

Handle that by first attempting to parse the -d arg as a posix format
date-time string (using a reasonably strict parser), and if that fails,
then fall back on parsedate(3) to parse the arg.

If the posix format parse succeeds, the result will be the same as
parsedate(3) would return for the same string - except any fractional
seconds will be handled properly.   If it fails, then nothing changes
from what we currently do.

Note the POSIX string is
	YYYY-MM-DDThh:mm:ss[.frac][Z]
where YYYY is (at least) 4 digits (leading 0's are acceptable if
you really must!) all the MM DD hh mm ss fields are exactly 2
digits, T is either 'T' or ' ', '.' is either itself, or ',',
and 'frac' is one or more digits.  Z (if given) is 'Z'.  The
[.,]frac and Z fields are optional.   Specify a time in a
slight shorthand like 2024-2-8T7:44:20  and the POSIX parse
will fail, leaving parsedate() to handle that (which it should).
But any fractional seconds which were given would be ignored.

Doc update coming - note the doc will call the YYYY field CCYY
instead, that's just a convenience to make other parts of what
is there make more sense - it is still one 4 (or more) digit field.

This should be an almost invisible change.
2024-02-08 02:53:53 +00:00
kre bda400655a Sprinkle come const - but not too much of a good thing.
NFCI
2024-02-08 02:53:40 +00:00
kre 1a8d06c811 Parameterise the "if year < 69 it is 20xx and if >=69 it is 19xx" rule
to make it simpler to (eventually, many years hence) to change that rule
to be "if year is < NN it is 21xx and if >= NN it is 20xx" instead.

Avoid comparing a time_t to -1 directly, as time_t might be unsigned.
Instead define NO_TIME as ((time_t)-1) and compare with that instead.
This makes no difference at all when time_t is signed (as it is on
NetBSD).

Use "ss" rather than "SS" as the seconds indicators (in messages)
to match with hh (hours) and mm (minutes) rather than looking like
some relation to YY (year) MM (month) and DD (day).   Why this was
ever written as SS is beyond me, but it has been that way forever.
(doc update will follow).

Minor improvement to the error message if the arg to a -t option
is unable to be parsed correctly.

NMFCI (No meaningful...)
2024-02-08 02:53:28 +00:00
kre 9298a61de3 KNF (space after keyword, and 80 column police).
NFCI

(This is the first of a series of changes to be committed
in rapid sequence).
2024-02-08 02:53:13 +00:00
rillig a30ba4f0a2 lint: use consistent variable names, reduce code for reading a byte
No functional change.
2024-02-07 08:00:36 +00:00
rillig 26428579ad lint: unify rules for determining the type of an integer constant
Previously, in traditional C mode, large decimal numbers were treated as
unsigned, which disagreed with the book from 1978.
2024-02-07 07:42:50 +00:00
rillig 716f56f56e make: remove redundant comments
No functional change.
2024-02-07 07:21:22 +00:00
rillig 0dd36725b6 make: remove unneeded conditional-compilation toggles
The toggles INCLUDES, LIBRARIES, POSIX, SYSVINCLUDE, SYSVVARSUB,
GMAKEEXPORT and SUNSHCMD are no longer needed, they were unconditionally
set.

The toggle NO_REGEX was configurable from the command line, but
disabling it would result in various error messages about the unknown
':C' modifier.

OK sjg@.
2024-02-07 06:43:02 +00:00
rillig bc8fe445c4 lint: tab-align message numbers in err.c
By replacing block comments with end-of-line comments, the comments take
up less space and thus no longer require to be indented by 6 spaces.

The messages and their comments are used in 3 places: the manual page
lint.7, the err-msgs.h header for debug mode, and check-msgs.lua to
verify that the comments above the message IDs correspond to the actual
messages.

No functional change.
2024-02-06 22:47:21 +00:00
rillig c4266104cb lint.7: remove implementation details from message list
From a user's perspective, it's irrelevant whether a lint message is
generated using '%s' or '%.*s'; same for the integer widths, as they are
platform-dependent.
2024-02-06 21:28:15 +00:00
rillig 5c34ad8f3f lint: make function call arguments directly accessible
Previously, the arguments of a function call expression were arranged in
a linear tree structure, from right to left.  To allow easier access to
the arguments, store them in an array instead.
2024-02-05 23:11:22 +00:00
andvar 82bba4e936 fix various typos in comments. 2024-02-05 21:46:04 +00:00
rillig 68c43e85ca make: do not evaluate indirect modifiers in parse-only mode
Discovered by sjg.
2024-02-04 10:03:10 +00:00
rillig 86d09a000c make: in parse-only mode, don't evaluate modifiers
Previously, the ':S', ':ts', ':tA' and ':from=to' modifiers were
evaluated in parse-only mode, unnecessarily.  This is only noticeable
when an indirect modifier is evaluated in parse-only mode, which is
another bug that will be fixed in a follow-up commit.
2024-02-04 09:56:24 +00:00
rillig 985de0af40 tests/make: extend test for wrong evaluation in parse-only mode 2024-02-04 09:29:50 +00:00
rillig 4aa832f99f tests/make: indirect modifiers are evaluated in parse-only mode
Found by sjg@.
2024-02-04 08:51:57 +00:00
mrg 2026b7285b update my email address. 2024-02-04 05:43:05 +00:00
mrg 8f36055f87 bump copyright and version. 2024-02-03 22:40:29 +00:00
rillig 139c6401cd lint: warn about short octal escape followed by '8' or '9'
These mistakes is typically found in snprintb format directives but is
probably a typo everywhere else as well.
2024-02-03 20:10:10 +00:00
rillig e6cddd1286 lint: remove excessive empty lines 2024-02-03 19:37:02 +00:00
rillig 095f481327 lint: keep strings in their source representation
This allows further analysis depending on whether individual characters are
escaped as octal, hexadecimal or not at all.
2024-02-03 19:25:16 +00:00
rillig 29354841ac lint: allow hexadecimal character escapes up to UINT_MAX
Previously, any value larger than INT_MAX was regarded as negative and
thus terminated the loop around get_escaped_char.
2024-02-03 18:58:05 +00:00
rillig ffb2a8ebeb lint: clean up comments, reduce scope of variables 2024-02-03 12:57:12 +00:00
rillig 661078afe6 lint: remove unused code for converting multibyte character sequences 2024-02-03 10:56:18 +00:00
rillig c1862de9dd lint: allow larger numbers in escapes for wide characters and strings 2024-02-03 10:01:58 +00:00
sjg 7106e16450 make: state of save_dollars affects what is a parse error
When save_dollars is false it is not a parse error to
encounter $$ rather than \$.
2024-02-03 00:20:23 +00:00
rillig 03951da31e lint: use the locale for interpreting wide character strings 2024-02-02 23:36:01 +00:00
andvar 947fbafb45 fix typos, mainly s/unsupport/unsupported/ in log messages. 2024-02-02 22:33:42 +00:00
rillig 8016349204 lint: fix debug output for strings, reduce code size
The debug output contained too many newlines.

The buffer functions were built into lint2 even though they weren't
used.

Enable the query for invisible characters in string literals, to make
sure that a newline in a string literal does not trigger that query.
2024-02-02 16:25:58 +00:00
rillig 402b4579b3 lint: make newline in a string literal an error in C90 and later 2024-02-02 16:05:37 +00:00
rillig 2f96b2b84b lint: reuse buffer editing code across lint1
Fix cat_strings to update the capacity of the buffer, to prevent
quadratic runtime when concatenating string literals.
2024-02-01 21:19:13 +00:00
rillig c9edda031f lint: use standard buffer for storing string values
No functional change.
2024-02-01 18:37:06 +00:00
christos 283a7ed9be fix tools build 2024-01-29 22:01:58 +00:00
christos ed7b026d6f PR/57891: Ricardo Branco: add symbolic flags printing (from FreeBSD) 2024-01-29 21:55:24 +00:00
rillig 9e650a18b6 lint: do not remember content of wide string literals
The plain char literals are needed for checking printf/scanf format
strings; lint has no similar check for wide strings. These format
strings are checked by modern compilers, making this check less
relevant.
2024-01-29 21:30:24 +00:00
rillig 49766a0931 lint: check getopt call more strictly
Previously, '(c = getopt(...)) != -2' would match as well.
2024-01-29 21:04:21 +00:00
rillig 8c7fbc585c lint: fix type of large integer constants 2024-01-27 20:03:14 +00:00
christos 063b07317d PR/57875: Jason Bacon: Try again without an _ for portability. 2024-01-27 16:04:36 +00:00
rillig 708007c3c9 lint: split determining the type of an integer constant
No functional change.
2024-01-27 15:53:27 +00:00
rillig 32781b5733 lint: extract signedness detection from lexing an integer constant
An integer constant that is signed in traditional C but unsigned since
C90 is an edge case that should not clutter the main code of determining
the resulting type of the constant.

The code for lexing an integer constant doesn't implement the C99 rules
yet, which convert a constant to the 'long long' types if the 'long'
types don't suffice.
2024-01-27 12:14:58 +00:00
sjg 384f068bd8 Note that in both :U and :D newval may be empty 2024-01-25 21:00:59 +00:00
sjg b0fb99a891 Indicate that for :U newval is optional 2024-01-25 07:35:46 +00:00
rillig c6c7f59fad lint: unconst parameters
These were leftovers from earlier refactorings and are no longer needed.

No binary change.
2024-01-23 20:03:42 +00:00
rillig 09702fc7eb lint: rename symt_t to symbol_kind
It was confusing to have two kinds of "symbol type" (s_type and s_symt),
so rename all related identifiers to be more distinctive.

No functional change.
2024-01-23 19:44:28 +00:00
rillig 9b86db195b make: refactor CondParser_Term to be inlinable
No functional change.
2024-01-21 16:32:41 +00:00
rillig d2763e34bd make: clean up parsing of conditions
No functional change.
2024-01-21 15:22:55 +00:00
rillig 2192214d0f make: clean up redundant 'const' from automatic variables
No binary change.
2024-01-21 15:02:17 +00:00
rillig 8ecccbd3a1 lint: on lint itself, disable query for const variables again
It suffixes to perform this check on demand.
2024-01-21 14:59:18 +00:00
rillig f7651e613b lint: clean up redundant const from parameters and local variables
These were leftovers from splitting large functions into smaller
functions, to ensure that variables were not unintentionally reassigned.
Those refactorings are finished, and the extra help from the compiler is
no longer necessary.

No binary change.
2024-01-21 14:21:34 +00:00
rillig 330a6ad5ca lint: create .ln output file even when queries are enabled
This allows to configure lint flags in mk.conf globally for a whole
NetBSD build.  Previously, this would have made the build fail due to
missing .ln files.

The previous use case of rerunning lint with or without queries is easy
enough to achieve by doing a 'make clean', in the same way as for lint
warnings.
2024-01-21 14:11:52 +00:00
rillig 9de7a84bd2 lint: clean up 2024-01-20 12:02:09 +00:00
rillig 7c3b3207ed lint: unclutter conditional compilation 2024-01-20 10:25:57 +00:00
rillig e6919d40e3 lint: only define xcalloc if actually used 2024-01-20 10:21:35 +00:00
rillig 45efdafbcc lint: add query for const automatic variables 2024-01-20 10:02:31 +00:00
rillig 6f23d4df44 lint: allow '\e' only in GCC mode 2024-01-19 19:23:34 +00:00
christos 7ad74d8547 add \e 2024-01-19 18:23:13 +00:00
thorpej 90a3cb0405 Bump version. 2024-01-18 05:41:38 +00:00
thorpej e407e52763 With config(1) as it exists today, a kernel Makefile is able to implement
logic on kernel options so long as those options are not defflag'd or
defparam'd.  This works because such options are automatally added to the
IDENT var in the kernel Makefile as a preprocessor define, and the Makefile
can then do an operation like:

.if !empty(IDENT:M-DSOMECOOLCPUOPTION)
CFLAGS+= -mcpu=somecoolcpu
.endif

Unfortunately, this precludes making it possible to generate a compile-time
dependency on SOMECOOLCPUOPTION, or having SOMECOOLCPUOPTION imply another
kernel config option using the normal config(1) option dependency function.

Fix this by introducing a new option description keyword: mkflagvar.  This
keyword marks an already defflag'd option as wanting a kernel Makefile var
defined if that option is selected in the kernel config file.  So:

defflag opt_coolcpu.h SOMECOOLCPUOPTION ANOTHERCOOLCPUOPTION
mkflagvar SOMECOOLCPUOPTION ANOTHERCOOLCPUOPTION

will cause:

KERNEL_OPT_SOMECOOLCPUOPTION="1"
KERNEL_OPT_ANOTHERCOOLCPUOPTION="1"

...to be emitted into the kernel Makefile if those options are, in fact,
selected with "options ..." in the kernel config file, thus allowing for
a compile-time dependency on the option to be generated in addition to
Makefile logic, which now looks like:

.if !empty(KERNEL_OPT_SOMECOOLCPUOPTION)
CFLAGS+= -mcpu=somecoolcpu
.endif
2024-01-18 04:41:37 +00:00
christos 3679c205f3 PR/57858: Ricardo Branco: Print the full pathname on errors.
from FreeBSD https://github.com/NetBSD/src/pull/25
2024-01-15 17:35:48 +00:00
mrg ef77be638e set file flags after setting other modes
otherwise permission to set modes may be revoked by the flags.
from PR#57855.  thanks!

XXX: pullup-all
2024-01-14 18:12:59 +00:00
christos 2782716bca better check st_size == 0, than st_dev == -1 2024-01-14 17:40:17 +00:00
christos 04bf1397ad Better check against st_size == 0 instead of st_dev == -1 2024-01-14 17:39:19 +00:00
christos e39dc43f61 PR/57850: Ricardo Branco: tail does not work in some pseudo-filesystems
From FreeBSD: https://github.com/NetBSD/src/pull/20
2024-01-14 17:37:32 +00:00
christos f4066449c8 PR/57854: Richardo Branco: wc -c does not work on procfs/kernfs 2024-01-14 17:16:10 +00:00
christos dfd2ee048f PR/57851: Ricardo Branco: stat(2) does not return correct size information
for kernfs/procfs files. Minor KNF.
2024-01-14 16:42:58 +00:00
rillig 312b884dfe lint: clean up grammar for initializers 2024-01-13 11:24:57 +00:00
rillig c8c38278b0 lint: inline simple grammar rules 2024-01-13 01:23:39 +00:00
rillig 1e0bac8ba8 lint: clean up grammar for array size 2024-01-12 08:33:39 +00:00
rillig 0153f4c1c0 lint: clean up enum constants for designators
In intializers and offsetof, both struct and union members are handled
in the same way, thus there is no need to distinguish them.
2024-01-11 23:26:39 +00:00
rillig d3fa5ab1cc lint: correctly set system-header flag on cast-expression
When a cast-expression comes partly from a system header, determine at
the ')' whether the whole cast-expression comes from the system header.
Previously, it was based on the operand, which contradicted the
documentation of tn_sys.

Mainly affects strict bool mode (where expressions from system headers
are handled more leniently), as well as query 9 for parenthesized return
expressions.

Discovered upon manual inspection, as calling expr_alloc_tnode should
never be necessary when creating an expression node with operands;
there's build_op for that purpose.
2024-01-11 23:06:19 +00:00
rillig e1fc9df408 lint: warn about integer overflow when folding constant INT_MIN / -1 2024-01-11 20:25:04 +00:00
rillig 75b2f6328c lint: disable -ftrapv for vax
When compiling lint1/cgram.c:
during RTL pass: postreload
cgram.c: In function 'yyparse':
cgram.c:5873:1: internal compiler error: in reload_combine_note_use,
    at postreload.c:1534
2024-01-11 04:45:20 +00:00
riastradh 679f6f2d1c getaddrinfo(1): Omit needless whitespace.
No functional change intended.
2024-01-10 01:48:16 +00:00
rillig 4b7b10e320 lint: allow complex offsetof(type, member-designator)
Both GCC 11 and Clang 8 accept member-designators that are not
identifiers but designator sequences, such as in 'offsetof(struct stat,
st_atim.tv_sec)', so make lint accept them as well.
2024-01-09 23:46:54 +00:00
rillig 74d7189882 lint: allow querying for invisible characters in literals and constants 2024-01-07 18:42:37 +00:00
rillig 7762dd1cfb lint: fix crash for invalid __func__ (since 2023-01-29) 2024-01-07 12:43:16 +00:00
rillig f30e56dbd1 lint: fix memory allocation names, eliminate double negation 2024-01-07 12:20:42 +00:00
rillig f1c3eb7dfb tests/make: test the '::=' modifier in target scope 2024-01-07 11:42:22 +00:00
rillig 1ef9033a57 make: clean up comments, constify shell name 2024-01-07 11:39:04 +00:00
sjg aebf99787e make: unit-tests handle TEST_MAKE:T != make
We need to allow for ${TEST_MAKE:T}[1-9]: etc when
TEST_MAKE is not 'make'
2024-01-07 02:07:44 +00:00
sjg 8966120cd1 make: more consistent error messages
Move %s: progname from Job_CheckCommands to Fatal
to avoid is being repeated when Job_CheckCommands is passed Error.

This means some errors from var also report progname (and level)
which is useful.

Reviewed by: rillig
2024-01-07 01:33:57 +00:00
rillig 08e0319cf4 lint: remove redundant parentheses, braces and comments
Rename the functions for folding constant expressions, to make the
comments redundant.
2024-01-06 15:05:24 +00:00
rillig f874f1691a lint: remove redundant comments 2024-01-06 14:21:26 +00:00
rillig 3718042051 tests/make: test long shell commands via Cmd_Exec 2024-01-05 23:36:45 +00:00
rillig f60719f052 make: miscellaneous cleanups 2024-01-05 23:22:06 +00:00
sjg 33c39ade1d Cmd_Exec use tempfile if cmd is too big
To avoid blowing commandline/env limits, if "cmd"
is more than 1000 bytes, write it to a file and pass that
to shell.

Reviewed by: rillig
2024-01-05 22:20:07 +00:00
rillig 781cfa8cd8 make: clean up string functions
No binary change.
2024-01-05 21:56:55 +00:00
rillig eaa537686a make: inline Substring_Sub
Remove redundant assertions.
2024-01-05 21:51:27 +00:00
rin 1246b914bd mklocale(1): Add range check for TODIGIT, rather than disabling it
PR lib/57798

Digit value specified by TODIGIT is storaged as lowest 8 bits of
_RuneType, see lib/libc/locale/runetype_file.h:

https://nxr.netbsd.org/xref/src/lib/libc/locale/runetype_file.h#56

The symptom reported in the PR is due to missing range check for
this value; values of 256 and above were mistakenly treated as
other flag bits in _RuneType.

For example, U+5146 has numerical value 1000,000,000,000 ==
0xe8d4a51000 where __BITS(30, 31) == _RUNETYPE_SW3 are turned on.
This is why wcwidth(3) returned 3 for this character.

This apparently affected not only character width, but also other
attributes storaged in _RuneType.

IIUC, digit value attributes in _RuneType have never been utilized
until now, but preserve these if digit fits within (0, 256). This
should be safer for pulling this up into netbsd-10. Also, these
attributes may be useful to implement some I18N features as
suggested by uwe@ in the PR.

netbsd-[98] is not affected as these use old UTF-8 ctype definitions.
2024-01-05 02:38:06 +00:00
sjg 8779a040c6 make: do not add newline to an empty buffer
When LoadFile reads from /dev/null the buffer will be empty,
appending "\n" just results in an unnecessary extra call
to ParseRawLine.

Reviewed by: rillig
2024-01-03 20:24:16 +00:00
rillig 43eae48d90 tests/make: finish incomplete sentence in test for assignment modifiers 2023-12-31 10:09:01 +00:00
rillig dd2389327b lint: in strict bool mode, allow 'a & b' in controlling expressions
Previously, the expression 'a & b' was only treated as bool if 'a' had
enum type.  This didn't cover cases in which bit masks were implemented
using integer types instead of enum sets.
2023-12-30 15:37:27 +00:00
rillig 5c34ccd44c make: clean up freeing of suffixes
No functional change.
2023-12-30 15:00:56 +00:00
rillig 9eee056f1b make: remove unused field from suffix
No functional change.
2023-12-30 13:28:06 +00:00
rillig e13d43880d make: unexport list memory management functions
They are only used in a single source file.

No functional change.
2023-12-29 20:43:58 +00:00
rillig 3ef4ce2dc2 make: fix declared types of list nodes
No functional change.
2023-12-29 18:53:24 +00:00
rillig 57b231c1d6 tests/make: test the '::=' assignment modifier 2023-12-29 15:47:03 +00:00
rillig dddafea765 make: simplify debug message for the ':@var@...@' modifier
The previous variant was hard to understand.
2023-12-29 14:57:00 +00:00
rillig 322a9b8797 make: clean up variable handling
All variables from the command line scope have the fromCmd flag set, so
there is no need to check for it.

Inline redundant local variables.

Variables from a scope cannot be short-lived, so there is no need to
call VarFreeShortLived.

No functional change.
2023-12-29 13:25:15 +00:00
rillig 045a444ef3 make: clean up comments
No binary change, except for line numbers in assertions.
2023-12-29 12:59:43 +00:00
rillig 27ffd1cd8f make: simplify memory allocation for string buffers
In edge cases and short-lived buffers, the initial buffer size is
irrelevant, so use the default.

No functional change.
2023-12-29 12:20:55 +00:00
rin 96f7cfd903 mklocale: XXX: Neglect TODIGIT at the moment
PR lib/57798

It was implemented with an assumption that all digit characters
can be mapped to numerical values <= 255.

This is no longer true for Unicode, and results in, e.g., wrong
return values of wcwidth(3) for U+5146 or U+16B60.

As a workaround, neglect TODIGIT for now, as done for OpenBSD:
https://github.com/OpenBSD/src/commit/4efe9bdeb34

XXX
At least netbsd-10 should be fixed, but it requires some tests.
2023-12-28 03:49:35 +00:00
sjg ca3fed09ea make: ensure shellPath is set before using it. 2023-12-27 00:45:37 +00:00
sjg ece0645989 Move fflush to a point to catch all cases. 2023-12-26 20:09:42 +00:00
sjg 79a3642923 make: fix order of output in compat mode
Ensure that make's output is correctly ordered with the output of the
target's commands, even when the output does not go to a terminal.

Reviewed by: rillig
2023-12-26 17:12:33 +00:00
sjg 94c9d8dd49 Compat_RunCommand call Shell_Init is shellPath is NULL
Since .SHELL is potentially used in compat mode as well,
the man page description should not imply it is only used in jobs mode.

Remove path="sh" from shell-sh unit-test - and it would have detected
this bug.

Reviewed by: rillig
2023-12-24 16:48:30 +00:00
rillig 56caec6d0e tests/make: add the expected output to the test for variable debugging 2023-12-20 09:46:00 +00:00
rillig 39690d4e35 make: use consistent debug messages style when ignoring variables
When a variable is not modified or not deleted, clearly say so and state
the reason.  Use the same style of debug messages everywhere, putting
the word 'ignoring' at the front.  Previously, that word sticked out to
the right, but only in some cases.
2023-12-20 09:03:08 +00:00
rillig 5c7b776444 make: fix confusing debug logging when deleting a variable
Be clear when deleting a variable is ignored and state the reason,
instead of only providing a keyword as a hint for insiders.
2023-12-20 08:50:10 +00:00
rillig 041a3b4e37 tests/make: demonstrate confusing debug log for read-only variables
The message 'delete %s' that occurs above the 'readOnly' looks as if the
variable would indeed be deleted.  The wording in the 'readOnly' line is
unclear.
2023-12-20 08:42:10 +00:00
rillig 5efe3083b2 make: clean up code coverage report files
Remove trailing whitespace.

Remove the first line, as it only repeats the filename.

Remove the line numbers, as they are mostly the same as in the original
source file.
2023-12-19 20:08:27 +00:00
rillig d3b2cbfcdf make: clean up comments
No binary change, except for line numbers in assertions.
2023-12-19 19:33:39 +00:00
rillig 8441dd97e7 tests/make: fix typo in test for ':C' modifier
The expression ${U:...} was always undefined, as there was no variable
named 'U'; the intended form was ${:U:...}.  Due to this typo, the
comments in the tests for the ':S' and the ':C' modifier contradicted
each other.
2023-12-18 11:13:51 +00:00
rillig 5ad30ed912 tests/make: test the fast code path for ':M' patterns like '*.c' 2023-12-17 23:19:02 +00:00
rillig c45c2cbe57 make: speed up pattern matching in the ':M' modifier
In the common patterns where '*' is followed by a regular character,
such as in the patterns '*.c' or '*.mk', search the next possible
matching position in a small loop, instead of repeatedly comparing the
first remaining pattern character to all special characters.
2023-12-17 22:46:44 +00:00
andvar 57a185009a s/Adapatation/Adaptation/ in l2cap sysctl description. 2023-12-17 14:38:49 +00:00
rillig e7a4688626 tests/make: extend tests for include guards and empty expressions 2023-12-17 14:07:22 +00:00
rillig 8e6814b7da make: on cleandir, clean the unit-tests as well 2023-12-17 10:48:10 +00:00
rillig 16175e1f2d error.1: fix markup 2023-12-17 09:46:57 +00:00
rillig 150501f9b0 tests/make: in 'expect' lines, require the complete text of the line 2023-12-17 09:44:00 +00:00
rillig ba87c41048 tests/make: add tests for spacing in multiple-inclusion guards 2023-12-17 09:17:16 +00:00
rillig 9bb158b559 make: clean up unused return value of str2Lst_Append
No functional change.
2023-12-17 09:02:26 +00:00
rillig 81cbe5a1c0 make: clean up names of local variables
No binary change.
2023-12-17 08:53:54 +00:00
rillig 2e8093b271 tests/make: add basic tests for the ':M' modifier 2023-12-17 00:19:11 +00:00
rillig ff1b52f721 tests/make: fix line numbers in expected test output for ':M' 2023-12-16 23:40:33 +00:00
rillig 879c461a18 tests/make: reorganize tests for the ':M' modifier
Add a table of contents.  Group the existing tests into sections.  Fix
the pattern of the test for the malformed ':M[\' modifier, now in line
283.

Note that the tests for the pattern characters '*?\' are missing.
2023-12-16 23:38:35 +00:00
rillig 9b0d37462a make: eliminate a local variable in Str_Match
No functional change.
2023-12-16 21:26:07 +00:00
wiz e7e8421e9c cvslatest(1): remove RETURN VALUES
Pages in section one should use EXIT STATUS instead (which this one
already provides).

Closes PR 57778 by Kouichi Hashikawa
2023-12-16 14:32:33 +00:00
mlelstv 8ca9a81697 Use IANA registerd service name "sunrpc" instead of "rpcbind". 2023-12-11 13:56:47 +00:00
riastradh 096391dfcd skey(1): Fix documentation of `-x' to match implementation.
PR bin/28495
2023-12-11 02:08:26 +00:00
rillig 3001856bca make: explain in the debug log why a variable assignment is ignored 2023-12-10 20:17:23 +00:00
rillig db7eedc6b6 make: remove redundant text from diagnostic about bad '?:' modifier 2023-12-10 20:12:28 +00:00
rillig 79eb3d19c8 make: clean up the check for command line variables
It looked suspicious that to check whether a variable was set via the
command line, the variable value would be needed.  Moving the debug
diagnostic to the calling function resolved this smell.

A variable from the command line scope is never short-lived, so there's
no need to clean up after accessing the variable.

No functional change.
2023-12-10 20:03:30 +00:00
rillig 51a7c589f0 make: clean up comments and local identifiers
No binary change, except for line numbers in assertions.
2023-12-10 19:56:53 +00:00
rillig 0056683bf5 make: document how to trigger a use-after-free bug
Since 2017-02-01.
2023-12-10 18:59:50 +00:00
rillig 97817c96ae indent: be strict about options from profile files
Previously, the "option" 'xdi0' was treated the same as '-xdi0'.
2023-12-10 17:45:35 +00:00
rillig 960c22026a lint: allow querying for 'static' followed by non-'static' declaration 2023-12-10 15:29:38 +00:00
rillig de4a7516ed lint: clean up comments
No functional change.
2023-12-10 14:59:47 +00:00
rillig c13c7044f5 make: fix crash in ':C' modifier on an empty expression
Since var.c 1.982 from 2021-12-13.
2023-12-10 14:30:50 +00:00
lukem 87c2a4af33 ftp(1): wording and formatting improvements
Fix grammar issue with "Support values" reported in private mail.
Document all file transfer types in "type" and cross-reference that.
Consistency fixes in describing file transfer parameters and types.
Fix some mandoc -Tlint issues (except "useless macro: Tn").
2023-12-09 02:15:11 +00:00
sjg 33d84d62a6 make: Var_SetWithFlags set fromCmd for SCOPE_CMDLINE
Set fromCmd true for SCOPE_CMDLINE
regardless of the variable name.

Reviewed by: rillig
2023-12-09 00:13:38 +00:00
rillig 41a58d8977 tests/make: show how global variables are unaffected by .for loops 2023-12-06 22:28:20 +00:00
rillig dd8677cc23 indent: inline input-related macros
No binary change.
2023-12-03 21:44:42 +00:00
rillig 0d9586f97c indent: group input-related variables into a struct
No functional change.
2023-12-03 21:40:44 +00:00
rillig 1cdfe3a93c indent: use line number of the token start in diagnostics
Previously, the line number of the end of the token was used, which was
confusing in debug mode.
2023-12-03 21:03:58 +00:00
rillig 18692033dc indent: fix line number counting in function definition
In a function definition that is split on two lines, if the first line
ends with a '*', the following line break didn't include the line
number.
2023-12-03 20:42:31 +00:00
rillig 5a2e7833b2 lint: in declarations, replace tab with space
Previously, in some cases, the keywords 'const' or 'struct' were
followed by a tab, which doesn't make sense.

No functional change.
2023-12-03 18:17:41 +00:00
rillig 5f975974aa lint: re-wrap comments
No functional change.
2023-12-03 13:12:40 +00:00
rillig 9b1ee10116 lint: move function body brace to the left
No functional change.
2023-12-03 12:24:48 +00:00
rillig a71c2934a4 lint: indent statement continuations consistently
No binary change.
2023-12-03 12:03:38 +00:00
rillig 9a1f8b7045 lint: extract nonportable char comparison to separate function
No functional change.
2023-12-02 21:53:15 +00:00
rillig a497ecafaf lint: remove redundant empty lines
No functional change.
2023-12-02 21:50:20 +00:00
rillig bed87f3850 lint: rename NOSCL to NO_SCL
For symmetry with NO_TSPEC.  No functional change.
2023-12-02 21:47:05 +00:00
rillig f2b68e81c5 make: replace 'variable expression' with 'expression' in comments
No binary change.
2023-11-19 22:50:11 +00:00
rillig da2f1f9711 tests/make: replace 'variable expressions' with 'expressions' 2023-11-19 22:32:44 +00:00
rillig 9b7d6ecc6b make: replace 'variable expression' with 'expression' in diagnostics 2023-11-19 22:06:15 +00:00
rillig 1da4da3f90 tests/make: replace 'variable expression' with 'expression'
Each expression is based on a variable, there's no need for the
verbosity.  The wording in make's diagnostics will be changed in a
follow-up commit.
2023-11-19 21:47:52 +00:00
rillig 5bc28d828b tests/make: cover all code paths for the ':mtime' modifier 2023-11-19 12:11:34 +00:00
rillig 3793f72151 make: produce more accurate error message for invalid ':mtime' argument 2023-11-19 11:47:49 +00:00
rillig b2af676a83 tests/make: test non-integer fallback in ':mtime' modifier 2023-11-19 11:37:44 +00:00
rillig f66367c683 make: extract detection of ':from=to' to a separate function
No functional change.
2023-11-19 11:30:28 +00:00
rillig ed28212fc3 tests/make: test and explain exporting of variables 2023-11-19 09:45:19 +00:00
rillig 7d1632466c make: clean up the modifier ':[...]'
No functional change.
2023-11-18 20:19:08 +00:00
rillig e9fa0ae34a tests/make: test parsing of the ':?' modifier 2023-11-18 19:25:43 +00:00
martin 3007f1403a Back out the following revisions on behalf of core:
sys/sys/lwp.h: revision 1.228
	sys/sys/pipe.h: revision 1.40
	sys/kern/uipc_socket.c: revision 1.306
	sys/kern/kern_sleepq.c: revision 1.84
	sys/rump/librump/rumpkern/locks_up.c: revision 1.13
	sys/kern/sys_pipe.c: revision 1.165
	usr.bin/fstat/fstat.c: revision 1.119
	sys/rump/librump/rumpkern/locks.c: revision 1.87
	sys/ddb/db_xxx.c: revision 1.78
	sys/ddb/db_command.c: revision 1.187
	sys/sys/condvar.h: revision 1.18
	sys/ddb/db_interface.h: revision 1.42
	sys/sys/socketvar.h: revision 1.166
	sys/kern/uipc_syscalls.c: revision 1.209
	sys/kern/kern_condvar.c: revision 1.60

  Add cv_fdrestart() [...]
  Use cv_fdrestart() to implement fo_restart.
  Simplify/streamline pipes a little bit [...]

This changes have caused regressions and need to be debugged.
The cv_fdrestart() addition needs more discussion.
2023-11-02 10:31:55 +00:00
rillig c30c9edea2 make: when comparing substrings, don't read beyond the substring's end
Right now, Substring_Words terminates each word with a '\0', but that's
an implementation detail that is not required by the interface, so don't
rely on it.
2023-11-02 06:09:07 +00:00
rillig 10b0fc2dcb make: miscellaneous cleanups
No functional change.
2023-11-02 05:55:22 +00:00
rillig 4a0a477dc7 tests/make: test appending to an environment variable 2023-11-02 05:46:26 +00:00
rillig a76be09c2a make: clean up comments
No functional change.
2023-11-02 05:40:49 +00:00
rillig 946e90dc4c make: sync comments with the extracted ParseModifier_Match
No functional change.
2023-11-02 05:14:58 +00:00
rillig 713aa52bfd make: inline a single-line cross-file function
No functional change.
2023-11-02 04:50:44 +00:00
jnemeth 3c0d6d1019 update for variable holidays in 2024 2023-10-30 06:32:19 +00:00
rillig fa1145b0c6 lint: reduce number of negations, fix variable name
No functional change.
2023-10-26 20:21:13 +00:00
rillig 796f9236e5 lint: merge redundant variables
No functional change.
2023-10-26 19:56:31 +00:00
rillig f7be23012b lint: make variable names more expressive, remove redundant comments
No functional change.
2023-10-25 23:05:14 +00:00
simonb d750207ba0 Add _SC_AVPHYS_PAGES.
getconf(1) add this and SC_PHYS_PAGES.
libc: Use vm.uvmexp2 over vm.meter is it's twice as fast on my setup.
getconf.3: Tidy up wording for SC_PHYS_PAGES.
2023-10-25 08:19:34 +00:00
simonb 117e5c1c54 Correct a comment - 8 * 1 million is 8 million, not 10 million (!). 2023-10-25 05:51:11 +00:00
rillig 39078cb5cc tests/make: clean up, explain and reorganize several tests 2023-10-19 18:24:33 +00:00
rillig 6841bb2db0 lint: resolve shift/reduce conflict in labels with attributes 2023-10-17 19:33:16 +00:00
rillig c032b66293 lint: fix debug output of convert/cast operators
The default name of the 'CVT' operator is 'convert', therefore the
override is only needed for 'cast'.
2023-10-17 19:29:09 +00:00
ad 61757a071b Simplify/streamline pipes a little bit:
- Allocate only one struct pipe not two (no need to be bidirectional here).
- Then use f_flag (FREAD/FWRITE) to figure out what to do in the fileops.
- Never wake the other side or acquire long-term (I/O) lock unless needed.
- Whenever possible, defer wakeups until after locks have been released.
- Do some things locklessly in pipe_ioctl() and pipe_poll().

Some notable results:

- -30% latency on a 486DX2/66 doing 1 byte ping-pong within a single process.
- 2.5x less lock contention during "make cleandir" of src on a 48 CPU machine.
- 1.5x bandwith with 1kB messages on the same 48 CPU machine (8kB: same b/w).
2023-10-13 19:07:08 +00:00
rillig 9f055456d5 make: remove obsolete comments, clean up comments and identifiers
No binary change, except for the line numbers in assertions.
2023-09-21 20:30:59 +00:00
rillig ced1546f2c make: clean up code for parsing the '-j' command line option
No binary change.
2023-09-19 17:43:43 +00:00
rillig 9770c42b7f lint: reduce pointer dereferences and relocations
No functional change.
2023-09-14 22:48:49 +00:00
rillig cc685adf28 lint: remove pseudo operators INC and DEC
These operators were not used in expressions, they were only used as
additional token info.  Use a plain bool instead.

No functional change.
2023-09-14 22:20:08 +00:00
rillig 4f890ce92c lint: fix wording of diagnostics about 'C99 extension'
The term 'extension' means an extension to a C standard.  C99 by itself
is not an extension but a revision of the C standard.
2023-09-14 21:53:02 +00:00
rillig 4451bd67b0 lint: remove preprocessor magic from definition of operators
No binary change.
2023-09-14 21:08:12 +00:00
rillig 2bfa62ddeb lint: prevent invalid memory access when checking an expression
In check_expr_misc, the left and right operands of an expression were
accessed even in the case of CON (constant), STRING (string literal) and
NAME (identifier), which led to invalid values in pointer variables.
These invalid values were not used though, but technically they invoked
undefined behavior.

Precede each access to the operands with a check that the expression
indeed has operands, except in those cases where the operand is known to
have operands by only looking at the code of the current function.
2023-09-13 20:31:58 +00:00
rillig a479246e62 lint: mark unreachable function call arguments as used as well
Previously, in a '?:' expression with a constant condition, the branch
that is not taken was skipped but any identifiers in there were intended
to be marked as used.  In function call expressions, this only worked
for the last argument, as the PUSH operator is not a binary operator
(see ops.def).  Cover this case as well.
2023-09-12 22:01:05 +00:00
rillig f88aa15bf2 lint: mark symbols that are only used in untaken '?:' branch as used 2023-09-12 07:23:27 +00:00
rillig d220208611 make: fix typo 2023-09-10 21:52:36 +00:00
sjg 192880ec61 make: skip -jC tests unless .MAKE.JOBS.C is yes 2023-09-10 16:25:32 +00:00
rillig 81b5cd66ad make: remove redundant 'extern' from function declaration 2023-09-10 11:52:29 +00:00
rillig 9e9a9a1a07 make: add more details to usage message of -j option 2023-09-10 11:41:32 +00:00
rillig 75a122d834 tests/make: add tests for parsing the -j option 2023-09-10 11:00:55 +00:00
rillig ea19f93a89 make: fix lint warning about strchr
main.c(416): warning:
    call to 'strchr' effectively discards 'const' from argument [346]

Even though C23 turns strchr into a const-generic function, it doesn't
do the same for strtol, so use separate pointers for the current parsing
position and the end of a number, as their constness differs.
2023-09-10 10:18:05 +00:00
ad c8c055b33a uidinfo is an SLIST. 2023-09-09 20:13:54 +00:00
ad 6e2810dfd3 - Shrink namecache entries to 64 bytes on 32-bit platforms and use 32-bit
key values there for speed (remains 128 bytes & 64-bits on _LP64).
- Comments.
2023-09-09 18:27:59 +00:00
sjg 7e018a29ea Add .MAKE.JOBS.C to indicate wether -jC is supported 2023-09-09 16:41:04 +00:00
mrg 3209145ae0 add explicit cast for long -> int truncation warning-as-error.
as this is number of CPUs, i don't think we have to care about
it for a long, long, *long* time...
2023-09-09 04:38:48 +00:00
sjg 859d4f0b97 make: allow -j to compute a multiple of ncpu
If _SC_NPROCESSORS_ONLN is supported; and -j arg is a floating point
number or ends in 'C' compute .MAKE.JOBS as a multiple of _SC_NPROCESSORS_ONLN

Based on a suggestion from des at freebsd.org
Discussed with: rillig, christos
2023-09-09 01:30:59 +00:00
shm 6dd74ebc31 Add check for space presence after comma in skin()
Check if comma is followed by space, otherwise it may lead to overflow in the
output buffer as space might be extra appended to the output buffer without
consuming anything from the input. This condition breaks the assumption that
length(input) >= length(output) while the code relies on it.
2023-09-08 20:46:45 +00:00
shm dc5c1e2202 Fix writing outside of the nbuf buffer in skin()
Data provided to skin() can be longer than LINEBUF (if same header is provided
multiple times, hfield returns concatenated data).

Thanks to riastradh@ for the review and comments
2023-09-08 20:37:07 +00:00
shm e8337abc7e Fix check_bufsize() incorrect behaviour
The function ensures that that buffer is large enough to store the data (if
not, it reallocates it). It doubled the buffer every time the buffer was too
small, but in some cases it wasn't enough, which might lead to heap overflows.
Rewrite of this function handles int overflow scenarios as well as ensures the
buffer is big enough to handle the data.

Thanks riastradh@ for the review and comments
2023-09-08 14:34:02 +00:00
shm de4a716ca6 Fixed undefined behaviour in hash()
Shift left on large int values was causing an undefined behaviour, fix it by
operating on unsigned int type instead. This patch changes behaviour of the
hash() slightly - if the computed hash is INT_MIN, the function previously
returned 0, but this case is negligible.
2023-09-08 14:22:04 +00:00
rillig db84d124cc tests/make: fix test for conditions of the form 'a > b' 2023-09-07 05:36:33 +00:00
rillig 08ac0fb3d4 error: clean up comparison of word vectors
The function wordvcmp returned -1 when either of the word vectors was
short; this made the function asymmetric. Since the function is only
used to compare two word vectors for equality, restrict it to this
particular use case.
2023-08-26 15:18:27 +00:00
rillig 1f3ad203f7 error: small cleanups 2023-08-26 15:07:14 +00:00
rillig 55512687bb error: use separate tokens for characters, integers and pointers
Assisted by lint's queries 10, 14, 15.

No binary change.
2023-08-26 14:59:44 +00:00
rillig 382be5b529 error: enable lint's strict bool mode
This cleans up the inconsistencies between 'int', 'boolean' and 'bool'.
2023-08-26 14:50:53 +00:00
rillig 9a4ec6c9ac error: move comment above the main function to the manual page
While here, clean up the markup of the manual page, removing unnecessary
emphasis.
2023-08-26 13:52:10 +00:00
rillig 9194f8e9f8 error: remove redundant parentheses around return value
No binary change.
2023-08-26 12:43:28 +00:00
rillig fedbe6cb2a error: fix lint warnings 2023-08-26 11:38:14 +00:00
rillig 1f27277735 error: fix typos 2023-08-26 11:35:56 +00:00
rillig dcb32fd76a lint: make diagnostics about ANSI C more international 2023-08-26 10:43:53 +00:00
rillig a492c0963b base64: getc and fputc are specified to return EOF, not -1
No binary change.
2023-08-23 19:16:14 +00:00
rin 51157c88ac mail: Fix regression for recent use-after-free fix
For makemessage(), do not skip thread_fix_old_links() for
newly-allocated message as before.

Thanks jun@ for report.
2023-08-23 03:49:00 +00:00
rillig 0871f1c309 tests/make: show a difference between 'export' and '.export' 2023-08-20 20:48:32 +00:00
sjg 90280d3b93 make.1: note that %s should only be used with :localtime 2023-08-20 19:58:15 +00:00
rillig 862b599eaa make: only work around wrong strftime if actually necessary
The workaround is only needed if the time format contains '%s', in all
other cases there is no need to preserve, set and restore the TZ
environment variable.  Suggested by sjg@.

Only check for 's' in the format string, not for '%s', to allow for
optional modifiers of the conversion specifier.
2023-08-19 19:59:17 +00:00
rillig 0d4b11a49d make: clean up comments regarding gmtime/strftime
These two functions are not supposed to be used together, thus it is not
a bug if combining them produces unexpected results.
2023-08-19 11:53:10 +00:00
rillig 99f1a845d3 make: work around bugs in gmtime on several platforms 2023-08-19 11:13:35 +00:00
rillig 2c49585ea5 make: show realistic invalid line in error message
Previously, the error message 'Invalid line' showed only the expanded
line, which might or might not show the actual problem.  To be more
helpful, add the unexpanded line to the error message in case they
differ.

Remove the special handling of invalid lines that result from merge
conflicts.  RCS is not commonly used anymore, and mentioning CVS was too
specific.  By echoing the whole line, the patterns '<<<<<<' and '>>>>>>'
are clear enough to hint at the problem.
2023-08-19 11:09:02 +00:00
rillig 64c6dcb455 make: add more details to error message about invalid lines 2023-08-19 10:52:13 +00:00
rillig b23bb1a017 tests/make: provide instructions for reproducing bug in gmtime
The test is not enabled because its results differ too much between the
platforms.
2023-08-19 10:33:32 +00:00
rillig 9fec43bd63 tests/make: document bug in ':gmtime' with '%s' 2023-08-19 08:19:25 +00:00
sjg aed82109ce varmod-mtime.mk: use :localtime for %s
Add a comment to explain why ${%s:L:localtime} should be used to get
a value that matches time(3).
2023-08-19 01:34:21 +00:00
sjg 5452dd36cb meta_ignore: check metaIgnorePaths on raw path
Some path prefixes can trigger automount, if we want to ignore them
it might be best to check metaIgnorePaths before we call realpath.
If the raw path does not match, check again after realpath.
2023-08-19 00:09:17 +00:00
martin a2d67661ff Rename local bpf_* functions to nsbpf_* to avoid conflicts with
new libpcap bpf_* functions
2023-08-18 13:18:17 +00:00
rillig 73daa299d5 make: be strict when parsing the argument of the ':mtime' modifier 2023-08-17 19:06:51 +00:00
rillig 8a0ae12bcf make: clean up variable names and indentation for the ':mtime' modifier
No functional change.
2023-08-17 18:52:51 +00:00
rillig c63251b3ed tests/make: extend tests for the ':mtime' modifier 2023-08-17 18:48:32 +00:00
rillig 62bde11359 tests/make: show that '||' and '&&' must be preceded by whitespace 2023-08-15 21:27:09 +00:00
rillig 9348f849bd lint: clean up comments
There's no output buffer anymore.
2023-08-12 21:32:16 +00:00
rillig 732614268e lint: remove redundant comments 2023-08-12 21:08:37 +00:00
rillig 7a33dc4ca7 lint: for each record in the output file, write the newline immediately
There's no point delaying the '\n' until the next line is written.
2023-08-12 20:48:24 +00:00
rillig 4a0dff3798 lint: clean up 2023-08-12 18:05:51 +00:00
rillig 0a9cffcd21 lint: remove unnecessary double-buffering for output files 2023-08-12 17:13:27 +00:00
mlelstv 76da897ffe Don't finish downloading an empty file with 'already done' before it is
created locally.
2023-08-12 07:40:13 +00:00
rillig a74131ed10 lint: clean up lexing of preprocessing lines
The relation between 'c' and 'cp' was tricky to follow.

No functional change.
2023-08-12 06:43:16 +00:00
mrg d02cd0c587 explicitly truncate display name string size. 2023-08-11 07:01:01 +00:00
rillig 68c91b7e5d tests/make: fix grammar in a test comment 2023-08-11 05:01:12 +00:00
rillig f78bce0bed make: clean up multiple-inclusion guards
No functional change.
2023-08-11 04:56:31 +00:00
rillig 67110fc12f base64: fix double fclose
Input errors are currently not reported, therefore no user-visible
change.
2023-08-11 02:49:28 +00:00
rillig 95517f8ccd base64: nix trailing whitespace and redundant braces, strict bool mode
No binary change.
2023-08-11 02:43:59 +00:00
mrg 81a719df6e avoid various use-after-free issues.
create a ptrdiff_t offset between the start of an allocation region and
some interesting pointer, so it can be adjusted with this offset after
realloc() returns.  for pdisk(), realloc() is a locally inlind malloc()
and free() pair.

for mail(1), this required a little bit more effort as the old pointer
was passed into another file for fix-ups there, and that code needed to
be adjusted for offset vs old pointer usage.

found by GCC 12.
2023-08-10 20:36:28 +00:00
rillig 7e8e260d9f lint: in -a mode, do not warn about integer conversions from 'int'
Since tree.c 1.552 from 2023-07-08, lint warned about integer
conversions from 'int' or 'unsigned int' to smaller integer types.  This
only affected 32-bit platforms where size_t is 'unsigned int' rather
than 'unsigned long', as on these platforms, the integer ranks of 'int'
and 'long' are the same, see INT_RANK in inittyp.c.

Discovered by lib/libkvm, which fails on i386 when lint generates any
warnings.
2023-08-08 20:15:10 +00:00
mrg 832d47522a introduce new GCC 12 warning disables and use them in a few places
this introduces 4 new warning disable flags:

   CC_WNO_MISSING_TEMPLATE_KEYWORD
   CC_WNO_REGISTER
   CC_WNO_STRINGOP_OVERREAD
   CC_WNO_ARRAY_BOUNDS

and documents them in README.warnings.  of these, the string op
and array bounds are both problematic (real bugs) and also spurious
(not real bugs), and the other 2 are mostly temporary for older
3rd party code.

add some new uses of CC_WNO_STRINGOP_OVERFLOW.

fix m68k build for gallium and GCC 12.
2023-08-08 06:27:31 +00:00
mrg 0727efc2be remove always-true part of condition.
found by GCC 12.
2023-08-07 23:31:11 +00:00
tnn 819c4d502d rpcgen: don't pass length of source to string copy operation
Altough the prior code can't fail, GCC complains about the practice.
2023-08-07 21:12:02 +00:00