VirtualBox

Changeset 52492 in vbox


Ignore:
Timestamp:
Aug 25, 2014 11:40:49 AM (10 years ago)
Author:
vboxsync
Message:

MachineImpl: warnings

File:
1 edited

Legend:

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

    r52490 r52492  
    12051205        {
    12061206            mNetworkAdapters.resize(newCount);
    1207             for (ULONG slot = oldCount; slot < mNetworkAdapters.size(); slot++)
     1207            for (size_t slot = oldCount; slot < mNetworkAdapters.size(); slot++)
    12081208            {
    12091209                unconst(mNetworkAdapters[slot]).createObject();
    1210                 mNetworkAdapters[slot]->init(this, slot);
     1210                mNetworkAdapters[slot]->init(this, (ULONG)slot);
    12111211            }
    12121212        }
     
    51685168                           Bstr(tr("Deleting files")).raw(),
    51695169                           true /* fCancellable */,
    5170                            pTask->llFilesToDelete.size() + pTask->llMediums.size() + 1,   // cOperations
     5170                           (ULONG)(pTask->llFilesToDelete.size() + pTask->llMediums.size() + 1),   // cOperations
    51715171                           BstrFmt(tr("Deleting '%s'"), pTask->llFilesToDelete.front().c_str()).raw());
    51725172
     
    87118711
    87128712        // boot order
    8713         for (size_t i = 0; i < RT_ELEMENTS(mHWData->mBootOrder); ++i)
     8713        for (unsigned i = 0; i < RT_ELEMENTS(mHWData->mBootOrder); ++i)
    87148714        {
    87158715            settings::BootOrderMap::const_iterator it = data.mapBootOrder.find(i);
     
    87758775
    87768776        // network adapters
    8777         uint32_t newCount = Global::getMaxNetworkAdapters(mHWData->mChipsetType);
    8778         uint32_t oldCount = mNetworkAdapters.size();
     8777        size_t newCount = Global::getMaxNetworkAdapters(mHWData->mChipsetType);
     8778        size_t oldCount = mNetworkAdapters.size();
    87798779        if (newCount > oldCount)
    87808780        {
    87818781            mNetworkAdapters.resize(newCount);
    8782             for (ULONG slot = oldCount; slot < mNetworkAdapters.size(); ++slot)
     8782            for (size_t slot = oldCount; slot < mNetworkAdapters.size(); ++slot)
    87838783            {
    87848784                unconst(mNetworkAdapters[slot]).createObject();
    8785                 mNetworkAdapters[slot]->init(this, slot);
     8785                mNetworkAdapters[slot]->init(this, (ULONG)slot);
    87868786            }
    87878787        }
     
    1003210032        // boot order
    1003310033        data.mapBootOrder.clear();
    10034         for (size_t i = 0; i < RT_ELEMENTS(mHWData->mBootOrder); ++i)
     10034        for (unsigned i = 0; i < RT_ELEMENTS(mHWData->mBootOrder); ++i)
    1003510035            data.mapBootOrder[i] = mHWData->mBootOrder[i];
    1003610036
     
    1008110081
    1008210082        /* Network adapters (required) */
    10083         uint32_t uMaxNICs = RT_MIN(Global::getMaxNetworkAdapters(mHWData->mChipsetType), mNetworkAdapters.size());
     10083        size_t uMaxNICs = RT_MIN(Global::getMaxNetworkAdapters(mHWData->mChipsetType), mNetworkAdapters.size());
    1008410084        data.llNetworkAdapters.clear();
    1008510085        /* Write out only the nominal number of network adapters for this
    1008610086         * chipset type. Since Machine::commit() hasn't been called there
    1008710087         * may be extra NIC settings in the vector. */
    10088         for (ULONG slot = 0; slot < uMaxNICs; ++slot)
     10088        for (size_t slot = 0; slot < uMaxNICs; ++slot)
    1008910089        {
    1009010090            settings::NetworkAdapter nic;
    10091             nic.ulSlot = slot;
     10091            nic.ulSlot = (uint32_t)slot;
    1009210092            /* paranoia check... must not be NULL, but must not crash either. */
    1009310093            if (mNetworkAdapters[slot])
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