From edeadac996837a6d9d8f5a2a42a569ff0f550532 Mon Sep 17 00:00:00 2001 From: stefanrueger Date: Mon, 17 Aug 2026 23:11:34 +0200 Subject: [PATCH] Fix compiler warning in src/usb_libusb.c --- src/usb_libusb.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/usb_libusb.c b/src/usb_libusb.c index 0f8ad407..c08ac00a 100644 --- a/src/usb_libusb.c +++ b/src/usb_libusb.c @@ -59,7 +59,7 @@ static int usbdev_open(const char *port, union pinfo pinfo, union filedescriptor struct usb_device *dev; usb_dev_handle *udev; char serno[64] = { 0 }; - int i, iface, rc; + int i, iface; if(fd->usb.max_xfer == 0) fd->usb.max_xfer = USBDEV_MAX_XFER_MKII; @@ -160,7 +160,8 @@ static int usbdev_open(const char *port, union pinfo pinfo, union filedescriptor * HID-class device. On those, the driver needs to be detached * before we can claim the interface. */ - if((rc = usb_detach_kernel_driver_np(udev, cx->usb_interface))) + int rc = usb_detach_kernel_driver_np(udev, cx->usb_interface); + if(rc) pmsg_notice("usb_detach_kernel_driver_np() unexpectedly returns %d: %s\n", rc, usb_strerror()); #endif