VirtualBox

Changeset 63495 in vbox for trunk/src/VBox/Storage/VD.cpp


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

warnings (clang)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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--;
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