Skip to content

libusb-1.0 deprecated calls #18

@nealey

Description

@nealey

As reported by Dmytro Vladimirov:

$ make clean all DEBUG=1
rm -f hdjd explore *.o
cc -Wall -Werror -g -DDEBUG -c -o hdjd.o hdjd.c
cc -Wall -Werror -g -DDEBUG -I/usr/include/libusb-1.0 -c -o usb.o usb.c
usb.c: In function ‘usb_setup’:
usb.c:154:3: error: ‘libusb_set_debug’ is deprecated: Use libusb_set_option instead [-Werror=deprecated-declarations]
154 | libusb_set_debug(context, LIBUSB_LOG_LEVEL_WARNING);
| ^~~~~~~~~~~~~~~~
In file included from usb.c:1:
/usr/include/libusb-1.0/libusb.h:1362:18: note: declared here
1362 | void LIBUSB_CALL libusb_set_debug(libusb_context *ctx, int level);
| ^~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make: *** [<builtin>: usb.o] Error 1

It seems we need to switch to libusb_set_option and stop using libusb_set_debug.

As a workaround, you can remove -Werror in the Makefile.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions