fix build warning: libusb_set_debug is deprecated (#1383)

* fix build warning:libuse_set_debug is deprecated

* use enum LIBUSB_LOG_LEVEL_INFO(3)
This commit is contained in:
Dean Lee
2020-04-18 04:39:42 +08:00
committed by GitHub
parent b418d6868d
commit 5967690499
+5
View File
@@ -943,7 +943,12 @@ int main() {
// init libusb
err = libusb_init(&ctx);
assert(err == 0);
#if LIBUSB_API_VERSION >= 0x01000106
libusb_set_option(ctx, LIBUSB_OPTION_LOG_LEVEL, LIBUSB_LOG_LEVEL_INFO);
#else
libusb_set_debug(ctx, 3);
#endif
pthread_t can_health_thread_handle;
err = pthread_create(&can_health_thread_handle, NULL,