VirtualBox

Ignore:
Timestamp:
Aug 15, 2016 8:51:35 PM (8 years ago)
Author:
vboxsync
Message:

warnings (clang)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-server/darwin/iokit.cpp

    r62485 r63503  
    9191*********************************************************************************************************************************/
    9292/** The IO Master Port. */
    93 static mach_port_t g_MasterPort = NULL;
     93static mach_port_t g_MasterPort = MACH_PORT_NULL;
    9494/** Major darwin version as returned by uname -r. */
    9595static uint32_t g_uMajorDarwin = 0;
     
    698698
    699699    IOObjectRelease(pNotify->AttachIterator);
    700     pNotify->AttachIterator = NULL;
     700    pNotify->AttachIterator = IO_OBJECT_NULL;
    701701    IOObjectRelease(pNotify->AttachIterator2);
    702     pNotify->AttachIterator2 = NULL;
     702    pNotify->AttachIterator2 = IO_OBJECT_NULL;
    703703    IOObjectRelease(pNotify->DetachIterator);
    704     pNotify->DetachIterator = NULL;
     704    pNotify->DetachIterator = IO_OBJECT_NULL;
    705705
    706706    CFRunLoopRemoveSource(CFRunLoopGetCurrent(), pNotify->NotifyRLSrc, CFSTR(VBOX_IOKIT_MODE_STRING));
     
    729729    kern_return_t krc = IORegistryEntryGetChildIterator(Object, kIOServicePlane, &Children);
    730730    if (krc != KERN_SUCCESS)
    731         return NULL;
     731        return IO_OBJECT_NULL;
    732732    io_object_t Child;
    733733    while ((Child = IOIteratorNext(Children)) != IO_OBJECT_NULL)
     
    818818     * Perform the search and get a collection of USB Device back.
    819819     */
    820     io_iterator_t USBDevices = NULL;
     820    io_iterator_t USBDevices = IO_OBJECT_NULL;
    821821    IOReturn rc = IOServiceGetMatchingServices(g_MasterPort, RefMatchingDict, &USBDevices);
    822822    AssertMsgReturn(rc == kIOReturnSuccess, ("rc=%d\n", rc), KERN_FAILURE);
     
    10691069     * Perform the search and get a collection of USB Device back.
    10701070     */
    1071     io_iterator_t USBDevices = NULL;
     1071    io_iterator_t USBDevices = IO_OBJECT_NULL;
    10721072    IOReturn rc = IOServiceGetMatchingServices(g_MasterPort, RefMatchingDict, &USBDevices);
    10731073    AssertMsgReturn(rc == kIOReturnSuccess, ("rc=%d\n", rc), NULL);
     
    12921292
    12931293    CFMutableDictionaryRef RefMatchingDict = IOServiceMatching(kIOUSBDeviceClassName);
    1294     AssertReturn(RefMatchingDict, NULL);
     1294    AssertReturn(RefMatchingDict, VERR_INTERNAL_ERROR_4);
    12951295
    12961296    uint64_t u64SessionId = 0;
     
    13321332    } while (*psz);
    13331333
    1334     io_iterator_t USBDevices = NULL;
     1334    io_iterator_t USBDevices = IO_OBJECT_NULL;
    13351335    IOReturn irc = IOServiceGetMatchingServices(g_MasterPort, RefMatchingDict, &USBDevices);
    1336     AssertMsgReturn(irc == kIOReturnSuccess, ("irc=%#x\n", irc), NULL);
     1336    AssertMsgReturn(irc == kIOReturnSuccess, ("irc=%#x\n", irc), VERR_INTERNAL_ERROR_5);
    13371337    RefMatchingDict = NULL; /* the reference is consumed by IOServiceGetMatchingServices. */
    13381338
     
    13641364    }
    13651365    IOObjectRelease(USBDevices);
    1366     USBDevices = NULL;
     1366    USBDevices = IO_OBJECT_NULL;
    13671367    if (!USBDevice)
    13681368    {
     
    14681468     * Perform the search and get a collection of DVD services.
    14691469     */
    1470     io_iterator_t DVDServices = NULL;
     1470    io_iterator_t DVDServices = IO_OBJECT_NULL;
    14711471    IOReturn rc = IOServiceGetMatchingServices(g_MasterPort, RefMatchingDict, &DVDServices);
    14721472    AssertMsgReturn(rc == kIOReturnSuccess, ("rc=%d\n", rc), NULL);
     
    16001600     * Perform the search and get a collection of ethernet controller services.
    16011601     */
    1602     io_iterator_t EtherIfServices = NULL;
     1602    io_iterator_t EtherIfServices = IO_OBJECT_NULL;
    16031603    IOReturn rc = IOServiceGetMatchingServices(g_MasterPort, RefMatchingDict, &EtherIfServices);
    16041604    AssertMsgReturn(rc == kIOReturnSuccess, ("rc=%d\n", rc), NULL);
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette