VirtualBox

Changeset 84384 in vbox for trunk/src/VBox


Ignore:
Timestamp:
May 20, 2020 5:07:26 AM (5 years ago)
Author:
vboxsync
Message:

Network/DevVirtioNet_1_0.cpp: Fix some Windows build warnings and check for more

Location:
trunk/src/VBox/Devices
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Network/DevVirtioNet_1_0.cpp

    r84383 r84384  
    717717    for (unsigned i = 0; i < RT_ELEMENTS(s_aFeatures); ++i)
    718718    {
    719         bool isOffered = fFeaturesOfferedMask & s_aFeatures[i].fFeatureBit;
    720         bool isNegotiated = pThis->fNegotiatedFeatures & s_aFeatures[i].fFeatureBit;
     719        uint64_t isOffered = fFeaturesOfferedMask & s_aFeatures[i].fFeatureBit;
     720        uint64_t isNegotiated = pThis->fNegotiatedFeatures & s_aFeatures[i].fFeatureBit;
    721721        cp += RTStrPrintf(cp, cbBuf - (cp - pszBuf), "        %s       %s   %s",
    722722                          isOffered ? "+" : "-", isNegotiated ? "x" : " ", s_aFeatures[i].pcszDesc);
     
    787787                 || offConfig == RT_UOFFSETOF(VIRTIONET_CONFIG_T, member) + sizeof(uint32_t)) \
    788788             && cb == sizeof(uint32_t)) \
    789          || (   offConfig >= RT_UOFFSETOF(VIRTIONET_CONFIG_T, member) \
    790              && offConfig + cb <= RT_UOFFSETOF(VIRTIONET_CONFIG_T, member) \
    791                                 + RT_SIZEOFMEMB(VIRTIONET_CONFIG_T, member)) )
     789         || (offConfig + cb <= RT_UOFFSETOF(VIRTIONET_CONFIG_T, member) \
     790                             + RT_SIZEOFMEMB(VIRTIONET_CONFIG_T, member)) )
    792791
    793792#ifdef LOG_ENABLED
     
    15791578
    15801579            /* Append remaining Rx pkt or as much current desc chain has room for */
    1581             uint32_t cbCropped = RT_MIN(cb, cbDescChainLeft);
     1580            size_t cbCropped = RT_MIN(cb, cbDescChainLeft);
    15821581            paVirtSegsToGuest[cSegs].cbSeg = cbCropped;
    15831582            paVirtSegsToGuest[cSegs].pvSeg = ((uint8_t *)pvBuf) + uOffset;
     
    17931792{
    17941793    uint8_t *pb = (uint8_t *)pv;
    1795     uint16_t cbLim = RT_MIN(pDescChain->cbPhysSend, cb);
     1794    size_t cbLim = RT_MIN(pDescChain->cbPhysSend, cb);
    17961795    while (cbLim)
    17971796    {
  • trunk/src/VBox/Devices/VirtIO/Virtio_1_0.h

    r84351 r84384  
    101101    uint32_t volatile   cRefs;                                      /**< Reference counter. */
    102102    uint32_t            uHeadIdx;                                   /**< Head idx of associated desc chain        */
    103     uint32_t            cbPhysSend;                                 /**< Total size of src buffer                 */
     103    size_t              cbPhysSend;                                 /**< Total size of src buffer                 */
    104104    PVIRTIOSGBUF        pSgPhysSend;                                /**< Phys S/G/ buf for data from guest        */
    105     uint32_t            cbPhysReturn;                               /**< Total size of dst buffer                 */
     105    size_t              cbPhysReturn;                               /**< Total size of dst buffer                 */
    106106    PVIRTIOSGBUF        pSgPhysReturn;                              /**< Phys S/G buf to store result for guest   */
    107107
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