Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libusb-1.0 deprecated calls #18

Open
nealey opened this issue Jan 14, 2025 · 0 comments
Open

libusb-1.0 deprecated calls #18

nealey opened this issue Jan 14, 2025 · 0 comments

Comments

@nealey
Copy link
Owner

nealey commented Jan 14, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant