darwin: fix const array size to work with GCC compilers
authorMichael Dickens <mlk@alum.mit.edu>
Wed, 30 Dec 2020 02:32:45 +0000 (21:32 -0500)
committerChris Dickens <christopher.a.dickens@gmail.com>
Mon, 8 Feb 2021 17:04:22 +0000 (09:04 -0800)
Closes #833

Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
libusb/os/darwin_usb.c
libusb/version_nano.h

index 8055cc05c803b31f3d1207b7149367fb3c124fb4..247954a8b8d26cd43d8e903b474e28eb1e869dcf 100644 (file)
@@ -2154,7 +2154,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[] = {"control", "isoc", "bulk", "interrupt", "bulk-stream", NULL};
   bool is_isoc = LIBUSB_TRANSFER_TYPE_ISOCHRONOUS == transfer->type;
 
   if (transfer->type > max_transfer_type) {
index e02ad1c229f5dbf513692b326315fd9b545b7367..acc3f1f54acbb48afb62635ce53272ae2c70cc4d 100644 (file)
@@ -1 +1 @@
-#define LIBUSB_NANO 11600
+#define LIBUSB_NANO 11601