From 3b38b5d48efac2f41fd50f85e201623493641adc Mon Sep 17 00:00:00 2001 From: faithwang Date: Wed, 15 Jun 2022 10:04:56 +0800 Subject: [PATCH] fix build beacuse of updateing clang 10 to 12 Signed-off-by: faithwang --- libusb/os/darwin_usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libusb/os/darwin_usb.c b/libusb/os/darwin_usb.c index e415589..9fdc4bb 100644 --- a/libusb/os/darwin_usb.c +++ b/libusb/os/darwin_usb.c @@ -2148,7 +2148,7 @@ static int darwin_handle_transfer_completion (struct usbi_transfer *itransfer) { struct libusb_transfer *transfer = USBI_TRANSFER_TO_LIBUSB_TRANSFER(itransfer); struct darwin_transfer_priv *tpriv = usbi_get_transfer_priv(itransfer); const unsigned char max_transfer_type = LIBUSB_TRANSFER_TYPE_BULK_STREAM; - const char *transfer_types[max_transfer_type + 1] = {"control", "isoc", "bulk", "interrupt", "bulk-stream"}; + const char *transfer_types[LIBUSB_TRANSFER_TYPE_BULK_STREAM + 1] = {"control", "isoc", "bulk", "interrupt", "bulk-stream"}; bool is_isoc = LIBUSB_TRANSFER_TYPE_ISOCHRONOUS == transfer->type; if (transfer->type > max_transfer_type) { -- Gitee