From: Ludovic R. <lud...@gm...> - 2009-10-25 09:16:51
|
Hello, I fixed some compilation warnings. The compiler warning is included in the patch commit message. "git format-patch origin" patches attached. I also have a lot of warnings like: libusbi.h:257: warning: pointer of type ‘void *’ used in arithmetic The fix is easy (see bellow). But It _may_ have side effects. The idea is to replace (void *) by (char *) --- /var/folders/Ix/Ixm8JMceFo4zOwN0Ef92LU+++TI/-Tmp-//YWMApC_libusbi.h 2009-10-25 10:13:30.000000000 +0100 +++ libusb/libusbi.h 2009-10-25 10:13:09.000000000 +0100 @@ -245,15 +245,15 @@ struct usbi_transfer { }; #define __USBI_TRANSFER_TO_LIBUSB_TRANSFER(transfer) \ - ((struct libusb_transfer *)(((void *)(transfer)) \ + ((struct libusb_transfer *)(((char *)(transfer)) \ + sizeof(struct usbi_transfer))) #define __LIBUSB_TRANSFER_TO_USBI_TRANSFER(transfer) \ - ((struct usbi_transfer *)(((void *)(transfer)) \ + ((struct usbi_transfer *)(((char *)(transfer)) \ - sizeof(struct usbi_transfer))) static inline void *usbi_transfer_get_os_priv(struct usbi_transfer *transfer) { - return ((void *)transfer) + sizeof(struct usbi_transfer) + return ((char *)transfer) + sizeof(struct usbi_transfer) + sizeof(struct libusb_transfer) + (transfer->num_iso_packets * sizeof(struct libusb_iso_packet_descriptor)); Regards, -- Dr. Ludovic Rousseau |