Loading fastboot/usb_osx.cpp +4 −3 Original line number Original line Diff line number Diff line Loading @@ -26,6 +26,7 @@ * SUCH DAMAGE. * SUCH DAMAGE. */ */ #include <inttypes.h> #include <stdio.h> #include <stdio.h> #include <CoreFoundation/CoreFoundation.h> #include <CoreFoundation/CoreFoundation.h> #include <IOKit/IOKitLib.h> #include <IOKit/IOKitLib.h> Loading Loading @@ -121,7 +122,7 @@ static int try_interfaces(IOUSBDeviceInterface182 **dev, usb_handle *handle) { result = (*plugInInterface)->QueryInterface( result = (*plugInInterface)->QueryInterface( plugInInterface, plugInInterface, CFUUIDGetUUIDBytes(kIOUSBInterfaceInterfaceID), CFUUIDGetUUIDBytes(kIOUSBInterfaceInterfaceID), (LPVOID) &interface); (LPVOID*) &interface); // No longer need the intermediate plugin // No longer need the intermediate plugin (*plugInInterface)->Release(plugInInterface); (*plugInInterface)->Release(plugInInterface); Loading Loading @@ -279,7 +280,7 @@ static int try_device(io_service_t device, usb_handle *handle) { // Now create the device interface. // Now create the device interface. result = (*plugin)->QueryInterface(plugin, result = (*plugin)->QueryInterface(plugin, CFUUIDGetUUIDBytes(kIOUSBDeviceInterfaceID), (LPVOID) &dev); CFUUIDGetUUIDBytes(kIOUSBDeviceInterfaceID), (LPVOID*) &dev); if ((result != 0) || (dev == NULL)) { if ((result != 0) || (dev == NULL)) { ERR("Couldn't create a device interface (%08x)\n", (int) result); ERR("Couldn't create a device interface (%08x)\n", (int) result); goto error; goto error; Loading Loading @@ -432,7 +433,7 @@ static int init_usb(ifc_match_func callback, usb_handle **handle) { } } if (h.success) { if (h.success) { *handle = calloc(1, sizeof(usb_handle)); *handle = reinterpret_cast<usb_handle*>(calloc(1, sizeof(usb_handle))); memcpy(*handle, &h, sizeof(usb_handle)); memcpy(*handle, &h, sizeof(usb_handle)); ret = 0; ret = 0; break; break; Loading Loading
fastboot/usb_osx.cpp +4 −3 Original line number Original line Diff line number Diff line Loading @@ -26,6 +26,7 @@ * SUCH DAMAGE. * SUCH DAMAGE. */ */ #include <inttypes.h> #include <stdio.h> #include <stdio.h> #include <CoreFoundation/CoreFoundation.h> #include <CoreFoundation/CoreFoundation.h> #include <IOKit/IOKitLib.h> #include <IOKit/IOKitLib.h> Loading Loading @@ -121,7 +122,7 @@ static int try_interfaces(IOUSBDeviceInterface182 **dev, usb_handle *handle) { result = (*plugInInterface)->QueryInterface( result = (*plugInInterface)->QueryInterface( plugInInterface, plugInInterface, CFUUIDGetUUIDBytes(kIOUSBInterfaceInterfaceID), CFUUIDGetUUIDBytes(kIOUSBInterfaceInterfaceID), (LPVOID) &interface); (LPVOID*) &interface); // No longer need the intermediate plugin // No longer need the intermediate plugin (*plugInInterface)->Release(plugInInterface); (*plugInInterface)->Release(plugInInterface); Loading Loading @@ -279,7 +280,7 @@ static int try_device(io_service_t device, usb_handle *handle) { // Now create the device interface. // Now create the device interface. result = (*plugin)->QueryInterface(plugin, result = (*plugin)->QueryInterface(plugin, CFUUIDGetUUIDBytes(kIOUSBDeviceInterfaceID), (LPVOID) &dev); CFUUIDGetUUIDBytes(kIOUSBDeviceInterfaceID), (LPVOID*) &dev); if ((result != 0) || (dev == NULL)) { if ((result != 0) || (dev == NULL)) { ERR("Couldn't create a device interface (%08x)\n", (int) result); ERR("Couldn't create a device interface (%08x)\n", (int) result); goto error; goto error; Loading Loading @@ -432,7 +433,7 @@ static int init_usb(ifc_match_func callback, usb_handle **handle) { } } if (h.success) { if (h.success) { *handle = calloc(1, sizeof(usb_handle)); *handle = reinterpret_cast<usb_handle*>(calloc(1, sizeof(usb_handle))); memcpy(*handle, &h, sizeof(usb_handle)); memcpy(*handle, &h, sizeof(usb_handle)); ret = 0; ret = 0; break; break; Loading