fixed compiler warning about possible uninitialized use by zero initializing
authorSean McBride <sean@rogue-research.com>
Fri, 26 Jul 2013 18:13:03 +0000 (14:13 -0400)
committerhjelmn <Nathan Hjelm hjelmn@cs.unm.edu>
Tue, 30 Jul 2013 16:43:49 +0000 (10:43 -0600)
libusb/os/darwin_usb.c
libusb/version_nano.h

index a24558c..d7f15a5 100644 (file)
@@ -210,6 +210,7 @@ static int usb_setup_device_iterator (io_iterator_t *deviceIterator, UInt32 loca
   return IOServiceGetMatchingServices(kIOMasterPortDefault, matchingDict, deviceIterator);
 }
 
+/* Returns 1 on success, 0 on failure. */
 static int get_ioregistry_value_number (io_service_t service, CFStringRef property, CFNumberType type, void *p) {
   CFTypeRef cfNumber = IORegistryEntryCreateCFProperty (service, property, kCFAllocatorDefault, 0);
   int ret = 0;
@@ -735,7 +736,7 @@ static int darwin_cache_device_descriptor (struct libusb_context *ctx, struct da
 static int darwin_get_cached_device(struct libusb_context *ctx, io_service_t service,
                                     struct darwin_cached_device **cached_out) {
   struct darwin_cached_device *new_device;
-  UInt64 sessionID, parent_sessionID;
+  UInt64 sessionID = 0, parent_sessionID = 0;
   int ret = LIBUSB_SUCCESS;
   usb_device_t **device;
   io_service_t parent;
index 1198722..bba8538 100644 (file)
@@ -1 +1 @@
-#define LIBUSB_NANO 10792
+#define LIBUSB_NANO 10793