From 62077d32a245b5a5a687265671219b31f3e4f99c Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Tue, 25 Aug 2015 17:48:12 -0700 Subject: [PATCH] Possible Mac build fix. The error was this: system/core/adb/usb_osx.cpp:203:74: error: values of type 'UInt32' should not be used as format arguments; add an explicit cast to 'unsigned int' instead [-Werror,-Wformat] snprintf(devpathBuf, sizeof(devpathBuf), "usb:%" PRIu32 "X", locationId); ~~~ ^~~~~~~~~~ (unsigned int) Which seems to be because on LP64 UInt32 is "unsigned int" but on LP32 it was "unsigned long". We don't have to care about LP32, so -- if we can -- we're probably better off just using uint32_t instead of UInt32. Change-Id: I576f76cf2016ee59caccbc317ef74b6e8d71d722 --- adb/usb_osx.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adb/usb_osx.cpp b/adb/usb_osx.cpp index 2ba3ff7d6..0ce85f35c 100644 --- a/adb/usb_osx.cpp +++ b/adb/usb_osx.cpp @@ -118,7 +118,7 @@ AndroidInterfaceAdded(void *refCon, io_iterator_t iterator) IOUSBDeviceInterface197 **dev = NULL; HRESULT result; SInt32 score; - UInt32 locationId; + uint32_t locationId; UInt8 if_class, subclass, protocol; UInt16 vendor; UInt16 product;