Commit Graph

17825 Commits

Author SHA1 Message Date
nia
dbb501c421 aiomixer: Fix sorting of ac97 controls 2021-05-08 12:53:15 +00:00
nia
209f7af6d7 hook up aiomixer 2021-05-07 21:51:20 +00:00
nia
e2c130f799 aiomixer: display the unit type for value controls 2021-05-07 19:37:03 +00:00
nia
5249aad00a aiomixer: use standout for headings, avoid banding in header
fixed a minor rendering problem when compiled against ncurses.

based mostly on feedback from uwe.
2021-05-07 17:47:30 +00:00
nia
26802ffd8d import aiomixer from git into usr.bin.
aiomixer is a graphical (curses-based) mixer for NetBSD audio.
2021-05-07 16:29:24 +00:00
rillig
8d96908096 lint: fix assertion failure when promoting a bit-field larger than int 2021-05-04 05:40:10 +00:00
rillig
2bdae3c73f lint: undefine macros for defining keywords after use
No functional change.
2021-05-03 08:03:45 +00:00
rillig
d6845656c5 lint: remove redundancy when defining classic keywords
No functional change.
2021-05-03 07:30:19 +00:00
rillig
f34b241711 lint: reduce redundancy when defining GCC attributes
This macro would have prevented the unintended inconsistency in the
attribute 'pcs' (for ARM).

No functional change.  The generated code is the same, except for the
line numbers in lint_assert.
2021-05-03 07:25:08 +00:00
rillig
58cf05d8c5 lint: allow variables to be named 'pcs' 2021-05-03 07:08:54 +00:00
rillig
944c465b9d lint: fix parsing of __typeof__ after statement in ({ ... })
Since C99, declarations and statements can be freely mixed, and GCC
supported this even before 1999.
2021-05-03 05:24:44 +00:00
rillig
fd32325145 lint: fix compiler warning about signedness mismatch
No functional change.
2021-05-03 03:46:55 +00:00
rillig
9491476953 lint: allow large integer types for bit-fields in GCC mode
These types are explicitly allowed by GCC.

I'm not sure which of the flags -g and -p should be stronger.  That is,
if both -g and -p are given, should 'unsigned char' be allowed as a
bit-field type since -g would allow it, or should it be warned about
since -p warns about it?  For now, continue to warn about these.
2021-05-02 22:07:49 +00:00
rillig
46bc06fdbe lint: extract check_bit_field_type from declare_bit_field
No functional change.
2021-05-02 21:48:53 +00:00
rillig
8e6f3338ac lint: on request, keep the preprocessor output
Previously, the simplest way of getting the preprocessed translation
unit was to run lint with the additional flag -V, which outputs the
command line of the C preprocessor, among other things.  That command
line does not include the proper quoting though, so it cannot be used
verbatim as a shell command if the command line contains spaces such as
in -Du64="unsigned long long".

In the common situation where lint is run via a Makefile, the option -V
had to be added in the Makefile itself since there is no make variable
for additional user-settable lint flags.  This is not straight-forward
enough.

Adding another command line option for this purpose would reduce the
remaining namespace for options.  Most of the 52 letters are already
used up.

To make this situation as simple as possible, preserve the output of the
C preprocessor depending on an environment variable.
2021-05-02 21:05:42 +00:00
rillig
f090e42deb lint: sort GCC attributes alphabetically in the grammar
No functional change.
2021-05-02 20:53:13 +00:00
rillig
ae67c40d79 ktruss: fix typo in comment 2021-05-01 18:07:52 +00:00
rillig
b7fe254f77 lint: support all documented variants of __attribute__((nonnull)) 2021-05-01 07:25:07 +00:00
christos
45349d1a26 put back nonnull. I meant to just sort it. 2021-05-01 00:08:44 +00:00
christos
07ef9ed32c add for mipsn64 2021-04-30 21:51:48 +00:00
christos
3c283926c0 - add nonstring attribute
- allow attributes after labels (for unused)
XXX: split the attributes into function, variable, etc attributes
so that we don't accept all attributes in all places (only where they make
sense)
2021-04-30 19:46:24 +00:00
christos
2152295555 Add constructor and destructor attribute priorities 2021-04-29 17:11:30 +00:00
rillig
962abf967a make: use consistent variable names, types and braces in DebugFailedJob
No functional change.
2021-04-27 16:25:46 +00:00
rillig
565f4473b9 make: remove stray space in -de output in jobs mode
In compat mode, having a space in this place makes sense to align the
target name with the command.  In jobs mode, since each command is
listed in a separate line, there is no need for the double space.
2021-04-27 16:23:21 +00:00
rillig
132c9f6004 tests/make: test the combination of -de with -j1
The test cases are the same as in opt-debug-errors.mk.  The output
differs in several details though.

Even though the option '-k' is given (which is the default for any tests
that don't override it in unit-tests/Makefile), there is no message
"(continuing)" anywhere.

The failed target is printed twice.  Once before the failed commands,
once after.  This redundancy is not necessary and may be removed in a
follow-up commit.

The printed commands are in their unexpanded form, which may or may not
be more helpful than the expanded and space-normalized form of compat
mode.  Either way, this is an unnecessary inconsistency between compat
mode and jobs mode.

In jobs mode, the message "make: stopped in $dir" is printed for each
failure, which is helpful since each of the jobs may have started in a
separate directory.
2021-04-27 16:20:06 +00:00
christos
495cc5cbc3 Print -de error information when running multiple jobs
Problem and patch description from https://reviews.freebsd.org/D29647:

When running `make -de` (without any -j flag) bmake prints which command
failed. However, when using the -j flag the -de flag is ignored. This can
make it rather difficult to determine which command failed in an very
parallel build (especially when combined with the -s flag to avoid
ridiculously large logfiles). For single-threaded builds we can combine
-s with -de to get the failed command but this does not work with -jN
(even with -j1). This patch prints the failed shell script with -de in the
multiple jobs mode as well.

From Alexander Richardson @ FreeBSD
2021-04-27 15:21:42 +00:00
christos
88ab0eac35 add const 2021-04-27 15:19:25 +00:00
christos
ef96cd7f1c Handle mipsn64 2021-04-25 23:52:59 +00:00
rillig
2bf1c0cbcf tests/make: add tests for ${...} without operator in conditions
These tests are already covered in cond-cmp-unary.mk, but my first guess
was to search for these tests in cond-token-var.mk, so keep them in both
tests.
2021-04-25 21:05:38 +00:00
lukem
9f8e2c9192 ftp(1): consistently use FTP for protocol use. 2021-04-25 09:09:55 +00:00
lukem
094f09734d ftp(1): consistent Ic (not Nm) for commands 2021-04-25 08:46:19 +00:00
lukem
4f096ae03f better XXX comment for buggy ftp server 2021-04-25 08:26:35 +00:00
rillig
5bd0234249 lint: merge duplicate code in grammar for GCC compound expressions
This increases the number of shift/reduce conflicts, once again.  I
don't know why since the previous two grammar rules only differed in a
single detail.  One of them had a declaration_list while the other
didn't.  This difference is exactly what declaration_list_opt is for.

Anyway, the tests for both cases (with and without declarations) work
exactly as before.

Merging this duplicate code will probably make it easier to fix the
current limitation in lint regarding GCC compound expressions that a
statement followed by a declaration generates a syntax error.

Fixing this is not trivial, my first attempt failed either with
segmentation faults or with sym->s_type becoming NOSPEC during the
expression.
2021-04-23 20:26:43 +00:00
christos
38e22eb187 Add common attribute 2021-04-20 21:48:39 +00:00
rillig
24fb524bea make: do not complain when skipping the condition 'no >= 10'
Seen in external/bsd/tmux when building with Clang.  See
varmod-ifelse.mk for the detailed story.
2021-04-19 23:51:42 +00:00
rillig
a12d67d575 tests/make: add another example for parsing of the modifier ':?' 2021-04-19 23:43:14 +00:00
rillig
2427b79c7f tests/make: add detailed explanation for error message in conditional 2021-04-19 23:27:17 +00:00
rillig
97e91d60e6 make: use straight quotes for error 'Bad conditional expression'
This diagnostic was supposed to be an error, see ApplyModifier_IfElse.

When such an error occurs while the makefiles are read, make stops with
an error, as can be expected.  But when such an error occurs later,
after all makefiles have been read, the message is printed but make does
not stop.

In lint mode (-dL), make stops in such a case.  I didn't dare to make
this the default behavior, out of fear of breaking existing build
infrastructure, not only in NetBSD or pkgsrc, but also FreeBSD and other
operating systems that use the bmake distribution, generated from the
same source code.
2021-04-19 22:22:27 +00:00
rillig
d23762c055 tests/make: demonstrate unexpected behavior of the modifier ':?' 2021-04-19 22:05:29 +00:00
christos
f1b2d7493d Fix weekday parsing; only reset the string when parsing fail and only set
the weekday when parsing succeeds (Steffen Nurpmeso)
2021-04-19 17:49:28 +00:00
rillig
9c24f7ff27 make: avoid double slash in name of temporary directory
If the environment variable TMPDIR is not set, make uses a default path
that includes a trailing '/'.

For extra correctness it always appended an extra '/', leading to paths
of the form '/tmp//makeXXXXXX'.  This looked suspicious, as if there had
been a forgotten empty part between the two '/'.  Avoid this ambiguity
by replacing '//' with '/'.
2021-04-19 16:35:11 +00:00
rillig
d6126ccc75 lint: add debug logging for reachability 2021-04-19 13:18:43 +00:00
rillig
5bf56b009b lint: remove WARNS=3, falling back to the default WARNS=5
It's strange that GCC does not warn about the nonliteral format strings
in lint1/err.c, lint2/msg.c and lint2/read.c, despite -Wformat=2, but
Clang does.
2021-04-18 22:51:24 +00:00
rillig
4b2703ba02 lint: fix strict bool mode errors in cgram.y
The code generated by yacc already adheres to strict bool mode, in
default mode as well as in debug mode.

Running lint on the generated cgram.c as well avoids most of the
"declared but not used" warnings from lint2.

The code generated by lex does not adhere to strict bool mode though.
Suppressing the errors from strict bool mode works, but then lint1 runs
into an assertion failure:

	assertion "tn != NULL || nerr != 0" failed
	    in expr at tree.c:3610 near scan.c:822

This leaves several warnings about "declared but not used" for the
functions from lex.c.
2021-04-18 21:53:37 +00:00
rillig
063d68d52b lint: reduce duplicate code for parsing .ln files 2021-04-18 21:12:50 +00:00
rillig
8edef9ff6a lint: fix error message in lint2 for missing record type in .ln file 2021-04-18 20:40:51 +00:00
rillig
fd674c8ffb lint: clean up option parsing 2021-04-18 20:15:17 +00:00
rillig
3f5e7494f3 lint: test emitting of symbol information in the .ln files
Even though the new test is quite large, it didn't find any bugs in the
code.  The only thing I'm unsure about is why static functions are
exported as well, since they are supposed to be local to the translation
unit.
2021-04-18 20:02:56 +00:00
rillig
9941f15572 lint: rename parameter to expr
That parameter used to be used for a single purpose, later it got used
for checking the reachability as well, which made the name misleading.
2021-04-18 17:54:33 +00:00
rillig
dd5ca14fc1 lint: remove redundant CONSTCOND
In do-while-0 loops, these are no longer needed since tree.c 1.202 from
2021-01-31.
2021-04-18 17:47:32 +00:00