diff options
author | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-26 19:49:43 +0000 |
---|---|---|
committer | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-26 19:49:43 +0000 |
commit | bb2392ce9145707c6255abfc807a40db0526b708 (patch) | |
tree | 16b999086ae5d947c9c498358198f0164f670c22 | |
parent | 6dd2db912090dbd608de9034ad3e06ee80510b23 (diff) | |
download | chromium_src-bb2392ce9145707c6255abfc807a40db0526b708.zip chromium_src-bb2392ce9145707c6255abfc807a40db0526b708.tar.gz chromium_src-bb2392ce9145707c6255abfc807a40db0526b708.tar.bz2 |
Fix a warning in libusb.
A new clang warns about this:
../../third_party/libusb/src/libusb/os/darwin_usb.c:1271:27: error: expression which evaluates to zero treated as a null pointer constant of type 'IOUSBInterfaceInterface550 **' (aka 'struct IOUSBInterfaceStruct550 **') [-Werror,-Wnon-literal-null-conversion]
cInterface->interface = IO_OBJECT_NULL;
^~~~~~~~~~~~~~
The warning looks correct to me. I filed upstream ticket 147 for this:
http://libusb.org/moderator/confirm/147 (currently awaiting moderation).
BUG=323668
TBR=cpu
Review URL: https://codereview.chromium.org/111853011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@242548 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | third_party/libusb/README.chromium | 1 | ||||
-rw-r--r-- | third_party/libusb/src/libusb/os/darwin_usb.c | 2 | ||||
-rw-r--r-- | third_party/libusb/upstream-tick147.patch | 13 |
3 files changed, 15 insertions, 1 deletions
diff --git a/third_party/libusb/README.chromium b/third_party/libusb/README.chromium index 134cbed..fd52246 100644 --- a/third_party/libusb/README.chromium +++ b/third_party/libusb/README.chromium @@ -16,3 +16,4 @@ Local Modifications: libusb_handle_event. - windows-build.patch has been applied. - darwin-sigfpe.patch has been applied. +- upstream-tick147.patch has been applied. diff --git a/third_party/libusb/src/libusb/os/darwin_usb.c b/third_party/libusb/src/libusb/os/darwin_usb.c index 58467c3..07d6d61 100644 --- a/third_party/libusb/src/libusb/os/darwin_usb.c +++ b/third_party/libusb/src/libusb/os/darwin_usb.c @@ -1268,7 +1268,7 @@ static int darwin_release_interface(struct libusb_device_handle *dev_handle, int if (kresult != kIOReturnSuccess) usbi_warn (HANDLE_CTX (dev_handle), "Release: %s", darwin_error_str(kresult)); - cInterface->interface = IO_OBJECT_NULL; + cInterface->interface = NULL; return darwin_to_libusb (kresult); } diff --git a/third_party/libusb/upstream-tick147.patch b/third_party/libusb/upstream-tick147.patch new file mode 100644 index 0000000..28acfc6 --- /dev/null +++ b/third_party/libusb/upstream-tick147.patch @@ -0,0 +1,13 @@ +diff --git a/third_party/libusb/src/libusb/os/darwin_usb.c b/third_party/libusb/src/libusb/os/darwin_usb.c +index 58467c3..07d6d61 100644 +--- a/third_party/libusb/src/libusb/os/darwin_usb.c ++++ b/third_party/libusb/src/libusb/os/darwin_usb.c +@@ -1268,7 +1268,7 @@ static int darwin_release_interface(struct libusb_device_handle *dev_handle, int + if (kresult != kIOReturnSuccess) + usbi_warn (HANDLE_CTX (dev_handle), "Release: %s", darwin_error_str(kresult)); + +- cInterface->interface = IO_OBJECT_NULL; ++ cInterface->interface = NULL; + + return darwin_to_libusb (kresult); + } |