rgwan / librech551

Open-source CH55x flashing tool, SDK....
147 stars 36 forks source link

Fix libusb deprecated API build warning #3

Closed mogenson closed 2 years ago

mogenson commented 6 years ago

'make' produces the build warning:

main.c: In function ‘main’:
main.c:184:2: warning: ‘libusb_set_debug’ is deprecated:
Use libusb_set_option instead [-Wdeprecated-declarations]
  libusb_set_debug(NULL, 3);
  ^~~~~~~~~~~~~~~~
In file included from main.c:24:0:
/usr/include/libusb-1.0/libusb.h:1300:18: note: declared here
 void LIBUSB_CALL libusb_set_debug(libusb_context *ctx, int level);
                  ^~~~~~~~~~~~~~~~

Use the current 'libusb_set_option()' API.

rgwan commented 6 years ago

Thanks

MrAureliusR commented 4 years ago

Why was this never merged? It's been over 2 years and this warning still pops up on build. Was wondering if someone had already made a pull request before I started working on it, surprised to see it was from 2018.