Commit Graph

19 Commits

Author SHA1 Message Date
Emil Velikov
d4b78d735f ci: add clang permutation, for 64bit only
Throw clang into the matrix, so we get a bit of extra coverage. As
evidenced by the disabled warning - it does catch extra issues.

Currently enabled only for 64bit builds, since fiddling with environment
variables and cross-files is more tricky than I can be asked atm x-D

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2024-10-16 17:31:11 +02:00
Greg Kroah-Hartman
829d1abbc8 lsusb-t: get rid of custom list.h logic
The list.h code is REALLY old, from a very old kernel version.  Import
the CCAN version instead, and move the code to use it.  This is in
anticipation of fixing up the memory leaks in this area.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-10-01 19:51:58 +02:00
Emil Velikov
97508b2393 meson: re-enable some warnings
The former is clang-only, which has been clean for a while. While the
latter is gone with the hash tables removal as of earlier commits.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2024-10-01 13:44:56 +01:00
Emil Velikov
86373efd93 man: move manual pages in designated sub-folder
Move the files into designated place, so they're easier to find and
reason with.

While in here, simplify the install_man() call to only include the
strings. Meson will convert them to files() and deduce the correct path
based on the file extension.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2024-09-30 20:00:30 +02:00
Emil Velikov
affc79b65f meson: fold usbhid-dump/meson.build in
The usbhid-dump project effectively lives in this repo (it was a git
module ages ago), so there's little point in the separate build file(s).

People can still build usbhid-dump alone, as below:
    ninja -C builddir/ usbhid-dump

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2024-09-30 19:53:52 +02:00
Emil Velikov
a09ff9e528 lsusb: const annotate most data, re-enable -Wdiscarded-qualifiers
With the API fixed and most data annotated as read-only, we can flip the
warning back on.

In theory all the arrays in usb-spec.h can be make constant, although
atm the entries have link to other (hashed) entries and is populated at
program startup.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2024-09-24 10:46:56 +01:00
Emil Velikov
8481dc2510 meson: add a bunch more warnings to the mix
Random collection of bits from other projects that I hack on. The
suggestions are currently disabled until resolved.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2024-09-19 18:25:30 +01:00
Emil Velikov
3be17cd1bd meson: enable commented out warnings
The code is warning free, so flip those on. Flip the Wformat=2 and
Wformat order, since the latter is =1 and overrides the former.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2024-09-19 18:04:23 +01:00
Emil Velikov
3ccc314d73 meson: convert Wswitch-enum to Wswitch and enable
The latter warns on missing cases in the switch. The former also warns
even if there is a default statement. We extensively use defaults so,
opt for the saner warning.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2024-09-19 18:04:23 +01:00
Emil Velikov
5d19330927 Rename .in files to their final state
With the earlier commits we've removed any processing done on these
in(put) files. Just rename them to their final form.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2024-09-19 17:45:09 +01:00
Greg Kroah-Hartman
ca7855ecd2 meson: disable -Wswitch-enum
Provides false-warnings, we are handling "unknown" enums with a
"default:" line in the switch statement in lsusb.c, yet gcc still
complains about it for some reason.  So disable the compiler warning
until the compilers are fixed.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-09-19 11:11:22 +02:00
Emil Velikov
008e330759 lsusb.py: remove @DATADIR@ instance
All the distributions out there, excluding Nix, use the default that is
already in the script.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2024-09-18 23:18:28 +01:00
Emil Velikov
9d8ec635d7 meson: temporary disable extra noisy warning
It flags over 80 instances, which we should probably fix at some point.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2024-09-18 23:18:28 +01:00
Emil Velikov
c738416051 meson: add all* CFLAGS from travis-autogen.sh
Add all the flags, apart from -Werror and -fdiagnostics-color=auto.

We don't want for the former in the default build, but for developer,
maintainer and/or CI builds ... Some patches adding CI, fixing the
warnings, etc will be coming later on.

The latter overrides the default color handling, so we cannot see them
pretty colo(u)rs ;-P

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2024-09-18 23:17:43 +01:00
Emil Velikov
2d9429eeb7 meson: add compiler warnings to the build
Make the inline comment a reality ;-) Apart from -g -Wall that is...

The latter is already set by default with warning_level=1 (we use 2) and
the former belongs in a developer file, coming with a later series.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2024-09-18 23:15:12 +01:00
Emil Velikov
5d14ff7127 meson: always include config.h first, use -include
Seems like we've (tried) to fix this in the past, although it crept in
again. Just use a compiler directive and drop the error prone individual
includes.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2024-09-18 23:15:10 +01:00
Emil Velikov
5ceedcf384 meson: set project details
List the licenses, add minimum meson version, C standard, warning level
and default prefix.

 - licenses - non-authoritative, a decent indication
 - meson 0.60 - like mesa, systemd, kmod, available in Debian old-stable
 - gnu99 - bit of a guess work, c99 definitely chokes
 - warning_level=2 - equivalent to -Wall -Wextra
 - prefix /usr like the autotools build

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2024-09-18 23:12:46 +01:00
Emil Velikov
892ee8d998 meson: bump to libusb-1.0.22, reinstate libusb_set_option()
Bump the required version to 1.0.22, as available in Debian 10
(old-old-stable), released ~6 years ago.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2024-09-18 22:54:10 +01:00
Greg Kroah-Hartman
86dcab8964 usbutils: convert build system to use meson
Autotools is great for what it is designed for, but that epoch is long
ago, and shipping random files/scripts that are not actually checked
into the build system is ripe for problems.

Convert the build over to use meson instead.  Bonus is that the build
logic is simpler (if not still messy in places), and that the build
itself is way faster.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-09-02 19:26:57 +02:00