VirtualBox

Changeset 18503 in vbox for trunk/src/VBox/Devices/Storage


Ignore:
Timestamp:
Mar 29, 2009 2:35:35 AM (16 years ago)
Author:
vboxsync
Message:

VHDHDDCore.cpp: r=bird: check @todo in VHD_PLATFORM_CODE_WI2R update case. Fixed two size_t warnings.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Storage/VHDHDDCore.cpp

    r18119 r18503  
    249249    memcpy(pvBuf, tmp16, cTmp16Len * sizeof(*tmp16));
    250250    if (pcbActualSize)
    251         *pcbActualSize = cTmp16Len * sizeof(*tmp16);
     251        *pcbActualSize = (uint32_t)(cTmp16Len * sizeof(*tmp16));
    252252
    253253out:
     
    277277        case VHD_PLATFORM_CODE_WI2R:
    278278            /* Update plain relative name. */
    279             cb = strlen(pszFilename);
    280             if (cb > cbMaxLen)
     279            cb = (uint32_t)strlen(pszFilename);
     280            if (cb > cbMaxLen) /** @todo r=bird: shoudln't this be cb >= cbMaxLen, or rather strlen() + 1? I don't dare update this without testing. */
    281281            {
    282282                rc = VERR_FILENAME_TOO_LONG;
     
    291291            if (RT_FAILURE(rc))
    292292                goto out;
    293             pLocator->u32DataLength = RT_H2BE_U32(strlen((char *)pvBuf));
     293            pLocator->u32DataLength = RT_H2BE_U32((uint32_t)strlen((const char *)pvBuf));
    294294            break;
    295295        case VHD_PLATFORM_CODE_W2RU:
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