VirtualBox

Changeset 63495 in vbox for trunk


Ignore:
Timestamp:
Aug 15, 2016 5:19:46 PM (8 years ago)
Author:
vboxsync
Message:

warnings (clang)

Location:
trunk/src/VBox
Files:
1 added
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3Lib.cpp

    r63338 r63495  
    332332    g_File        = NIL_RTFILE;
    333333    kern_return_t kr = IOServiceClose(uConnection);
    334     AssertMsg(kr == kIOReturnSuccess, ("%#x (%d)\n", kr, kr));
     334    AssertMsg(kr == kIOReturnSuccess, ("%#x (%d)\n", kr, kr)); NOREF(kr);
    335335    int rc = RTFileClose(hFile);
    336336    AssertRC(rc);
  • trunk/src/VBox/Additions/common/VBoxService/VBoxServiceBalloon.cpp

    r62521 r63495  
    7575static void **g_pavBalloon = NULL;
    7676
     77#ifdef RT_OS_LINUX
    7778/** True = madvise(MADV_DONTFORK) works, false otherwise. */
    7879static bool g_fSysMadviseWorks;
     80#endif
    7981
    8082
  • trunk/src/VBox/Additions/darwin/VBoxClient/VBoxClientClipboard.cpp

    r62523 r63495  
    146146 * Forwards cliproard content between host and guest.
    147147 *
    148  * @param   ThreadSelf  Unused parameter.
     148 * @param   hThreadSelf  Unused parameter.
    149149 * @param   pvUser      Unused parameter.
    150150 *
    151151 * @return  IPRT status code.
    152152 */
    153 static DECLCALLBACK(int) vbclGuestPasteboardPoll(RTTHREAD ThreadSelf, void *pvUser)
    154 {
     153static DECLCALLBACK(int) vbclGuestPasteboardPoll(RTTHREAD hThreadSelf, void *pvUser)
     154{
     155    RT_NOREF(hThreadSelf, pvUser);
     156
    155157    /*
    156158     * Block all signals for this thread. Only the main thread will handle signals.
  • trunk/src/VBox/Frontends/VBoxBalloonCtrl/VBoxWatchdog.cpp

    r63384 r63495  
    372372        AssertRC(rc2);
    373373
    374         mapVMIter it = g_mapVM.find(strUuid);
    375         Assert(it == g_mapVM.end());
     374        Assert(g_mapVM.find(strUuid) == g_mapVM.end());
    376375        g_mapVM.insert(std::make_pair(strUuid, m));
    377376        serviceLogVerbose(("Added machine \"%ls\"\n", strUuid.raw()));
  • trunk/src/VBox/HostDrivers/VBoxUSB/darwin/testcase/tstOpenUSBDev.cpp

    r62490 r63495  
    8080
    8181
    82 static int tstDoWork(io_object_t USBDevice, mach_port_t MasterPort, const char *argv0)
     82static int tstDoWork(io_object_t USBDevice, const char *argv0)
    8383{
    8484    /*
     
    190190
    191191    int ch;
    192     int i = 1;
    193192    RTGETOPTUNION ValueUnion;
    194193    RTGETOPTSTATE GetState;
     
    218217     * Open the master port.
    219218     */
    220     mach_port_t MasterPort = NULL;
     219    mach_port_t MasterPort = MACH_PORT_NULL;
    221220    krc = IOMasterPort(MACH_PORT_NULL, &MasterPort);
    222221    if (krc != KERN_SUCCESS)
     
    236235    }
    237236
    238     io_iterator_t USBDevices = NULL;
     237    io_iterator_t USBDevices = IO_OBJECT_NULL;
    239238    IOReturn irc = IOServiceGetMatchingServices(MasterPort, RefMatchingDict, &USBDevices);
    240239    if (irc != kIOReturnSuccess)
     
    267266                cMatches++;
    268267                CFRelease(PropsRef);
    269                 tstDoWork(USBDevice, MasterPort, argv[0]);
     268                tstDoWork(USBDevice, argv[0]);
    270269            }
    271270            else
  • trunk/src/VBox/HostServices/SharedClipboard/service.cpp

    r62792 r63495  
    749749}
    750750
     751#ifndef UNIT_TEST
    751752/**
    752753 * SSM descriptor table for the VBOXCLIPBOARDCLIENTDATA structure.
     
    761762    SSMFIELD_ENTRY_TERM()
    762763};
     764#endif
    763765
    764766static DECLCALLBACK(int) svcSaveState(void *, uint32_t u32ClientID, void *pvClient, PSSMHANDLE pSSM)
  • trunk/src/VBox/Main/src-helper-apps/VBoxExtPackHelperApp.cpp

    r62875 r63495  
    13511351
    13521352#elif defined(RT_OS_DARWIN)
     1353    RT_NOREF(pszDisplayInfoHack);
    13531354    char szIconName[RTPATH_MAX];
    13541355    int rc = RTPathAppPrivateArch(szIconName, sizeof(szIconName));
     
    13871388             */
    13881389            FILE *pSocketStrm;
     1390#if defined(__clang__) || RT_GNUC_PREREQ(4, 4)
     1391# pragma GCC diagnostic push
     1392#endif
     1393#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
    13891394            orc = AuthorizationExecuteWithPrivileges(AuthRef, pszExecPath, kAuthorizationFlagDefaults,
    13901395                                                     (char * const *)&papszArgs[cSuArgs + 3],
    13911396                                                     &pSocketStrm);
     1397#if defined(__clang__) || RT_GNUC_PREREQ(4, 4)
     1398# pragma GCC diagnostic pop
     1399#endif
    13921400            if (orc == errAuthorizationSuccess)
    13931401            {
  • trunk/src/VBox/Storage/VD.cpp

    r62873 r63495  
    659659/** Array of pointers to the filters backends. */
    660660static PCVDFILTERBACKEND *g_apFilterBackends = NULL;
     661#ifndef VBOX_HDD_NO_DYNAMIC_BACKENDS
    661662/** Array of handles to the corresponding plugin. */
    662 static RTLDRMOD *g_ahFilterBackendPlugins = NULL;
     663static PRTLDRMOD g_pahFilterBackendPlugins = NULL;
     664#endif
    663665
    664666/** Forward declaration of the async discard helper. */
     
    692694}
    693695
     696#ifndef VBOX_HDD_NO_DYNAMIC_BACKENDS
    694697/**
    695698 * internal: add single backend.
     
    699702    return vdAddBackends(hPlugin, &pBackend, 1);
    700703}
     704#endif
    701705
    702706/**
     
    723727}
    724728
     729#ifndef VBOX_HDD_NO_DYNAMIC_BACKENDS
     730
    725731/**
    726732 * internal: add single cache backend.
     
    730736    return vdAddCacheBackends(hPlugin, &pBackend, 1);
    731737}
     738
    732739
    733740/**
     
    747754    g_apFilterBackends = pTmp;
    748755
    749     RTLDRMOD *pTmpPlugins = (RTLDRMOD*)RTMemRealloc(g_ahFilterBackendPlugins,
    750            (g_cFilterBackends + cBackends) * sizeof(RTLDRMOD));
     756    PRTLDRMOD pTmpPlugins = (PRTLDRMOD)RTMemRealloc(g_pahFilterBackendPlugins,
     757                                                    (g_cFilterBackends + cBackends) * sizeof(RTLDRMOD));
    751758    if (RT_UNLIKELY(!pTmpPlugins))
    752759        return VERR_NO_MEMORY;
    753760
    754     g_ahFilterBackendPlugins = pTmpPlugins;
     761    g_pahFilterBackendPlugins = pTmpPlugins;
    755762    memcpy(&g_apFilterBackends[g_cFilterBackends], ppBackends, cBackends * sizeof(PCVDFILTERBACKEND));
    756763    for (unsigned i = g_cFilterBackends; i < g_cFilterBackends + cBackends; i++)
    757         g_ahFilterBackendPlugins[i] = hPlugin;
     764        g_pahFilterBackendPlugins[i] = hPlugin;
    758765    g_cFilterBackends += cBackends;
    759766    return VINF_SUCCESS;
    760767}
     768
    761769
    762770/**
     
    771779    return vdAddFilterBackends(hPlugin, &pBackend, 1);
    772780}
     781
     782#endif /* VBOX_HDD_NO_DYNAMIC_BACKENDS*/
    773783
    774784/**
     
    36473657    for (unsigned i = 0; i < g_cFilterBackends; i++)
    36483658    {
    3649         while (i < g_cFilterBackends && g_ahFilterBackendPlugins[i] == pIt->hPlugin)
     3659        while (i < g_cFilterBackends && g_pahFilterBackendPlugins[i] == pIt->hPlugin)
    36503660        {
    36513661            memcpy(&g_apFilterBackends[i], &g_apFilterBackends[i + 1], (g_cFilterBackends - i - 1) * sizeof(PCVBOXHDDBACKEND));
    3652             memcpy(&g_ahFilterBackendPlugins[i], &g_ahFilterBackendPlugins[i + 1], (g_cFilterBackends - i - 1) * sizeof(RTLDRMOD));
     3662            memcpy(&g_pahFilterBackendPlugins[i], &g_pahFilterBackendPlugins[i + 1], (g_cFilterBackends - i - 1) * sizeof(RTLDRMOD));
    36533663            /** @todo for now skip reallocating, doesn't save much */
    36543664            g_cFilterBackends--;
  • trunk/src/VBox/Storage/VHDX.cpp

    r62743 r63495  
    708708}
    709709
     710#if 0 /* unused */
     711
    710712/**
    711713 * Converts a VHDX log entry header between file and host endianness.
     
    752754}
    753755
     756
    754757/**
    755758 * Converts a VHDX log data descriptor between file and host endianness.
     
    772775}
    773776
     777
    774778/**
    775779 * Converts a VHDX log data sector between file and host endianness.
     
    789793    pLogDataSectorConv->u32SequenceLow   = SET_ENDIAN_U32(pLogDataSector->u32SequenceLow);
    790794}
     795
     796#endif /* unused */
    791797
    792798/**
     
    880886}
    881887
     888#if 0 /* unused */
     889
    882890/**
    883891 * Converts a VHDX page 83 data item between file and host endianness.
     
    895903    vhdxConvUuidEndianess(enmConv, &pPage83DataConv->UuidPage83Data, &pPage83Data->UuidPage83Data);
    896904}
     905#endif /* unused */
    897906
    898907/**
     
    912921}
    913922
     923#if 0 /* unused */
     924
    914925/**
    915926 * Converts a VHDX physical sector size item between file and host endianness.
     
    928939}
    929940
     941
    930942/**
    931943 * Converts a VHDX parent locator header item between file and host endianness.
     
    946958}
    947959
     960
    948961/**
    949962 * Converts a VHDX parent locator entry between file and host endianness.
     
    964977    pParentLocatorEntryConv->u16ValueLength = SET_ENDIAN_U16(pParentLocatorEntry->u16ValueLength);
    965978}
     979
     980#endif /* unused */
    966981
    967982/**
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