libusbx v1.0.9-rc4 is now available

Pete Batard pete at akeo.ie
Fri Mar 30 08:49:04 EDT 2012


On 2012.03.30 10:34, Xiaofan Chen wrote:
> First test is carried out under Mac OS X.
>
> 1) one compiler warning, better fix

I think the attached patch should address it. If you have a chance to 
test and confirm, that'd be great. I don't have a 64 bit OS X platform 
to test with, so I don't think I can reproduce that one.

> 2) not so sure why xusb example default to debug log mode.

> libusb:info [process_new_device] allocating new device for location 0xfa000000
> libusb:info [darwin_check_configuration] active config: 1, first config: 1
> libusb:info [process_new_device] found device with address 1 at
> 001-05ac-8006-09-00
> libusb:info [process_new_device] allocating new device for location 0xfa100000
> libusb:info [darwin_check_configuration] active config: 1, first config: 1
> libusb:info [process_new_device] found device with address 2 at

Looks to me like you are getting info messages, which is unrelated to 
enabling debug. I don't think these messages should be info, as there 
are quite a lot of them. May want to fix that for 1.0.10. I just logged 
trac issue #1 against this (so that we can test trac as well).

Regards,

/Pete
-------------- next part --------------
>From 68cfabb733623ac1d4ea7d1a156af03ea3127c1d Mon Sep 17 00:00:00 2001
From: Pete Batard <pete at akeo.ie>
Date: Fri, 30 Mar 2012 13:40:32 +0100
Subject: [PATCH] Darwin: Fix a warning on 64 bit platforms

---
 libusb/os/darwin_usb.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libusb/os/darwin_usb.c b/libusb/os/darwin_usb.c
index e112cf5..c51557a 100644
--- a/libusb/os/darwin_usb.c
+++ b/libusb/os/darwin_usb.c
@@ -1547,7 +1547,7 @@ static void darwin_async_io_callback (void *refcon, IOReturn result, void *arg0)
 
   usbi_info (ITRANSFER_CTX (itransfer), "an async io operation has completed");
 
-  size = (UInt32) arg0;
+  size = (UInt32) (intptr_t) arg0;
 
   /* send a completion message to the device's file descriptor */
   message = MESSAGE_ASYNC_IO_COMPLETE;
-- 
1.7.9.msysgit.0



More information about the libusbx mailing list