VirtualBox

Ignore:
Timestamp:
Jun 1, 2023 11:09:52 AM (21 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
157710
Message:

Runtime/RTFdt: Some untested generator API + implementation, bugref:10401 [build fix]

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/common/misc/fdt.cpp

    r100031 r100032  
    11301130        return VINF_SUCCESS;
    11311131
    1132     size_t cbNew = RT_ALIGN_32(pThis->cbStrings + cch, 256);
     1132    uint32_t cbNew = RT_ALIGN_32(pThis->cbStrings + cch, 256);
    11331133    void *pvStringsNew = RTMemReallocZ(pThis->paszStrings, pThis->cbStringsMax, cbNew);
    11341134    if (!pvStringsNew)
     
    11641164
    11651165        /** @todo Optimize? The strings block is not very large though so probably not worth the effort. */
    1166         off += strlen(&pThis->paszStrings[off]) + 1;
     1166        off += (uint32_t)strlen(&pThis->paszStrings[off]) + 1;
    11671167    }
    11681168
    11691169    /* Not found, need to insert. */
    1170     size_t cch = strlen(psz) + 1;
     1170    uint32_t cch = (uint32_t)strlen(psz) + 1;
    11711171    int rc = rtFdtStringsEnsureSpace(pThis, cch);
    11721172    if (RT_FAILURE(rc))
     
    11921192        return VINF_SUCCESS;
    11931193
    1194     size_t cbNew = RT_ALIGN_32(pThis->cbStruct + cbSpaceRequired, _1K);
     1194    uint32_t cbNew = RT_ALIGN_32(pThis->cbStruct + cbSpaceRequired, _1K);
    11951195    void *pvStructNew = RTMemReallocZ(pThis->pbStruct, pThis->cbStructMax, cbNew);
    11961196    if (!pvStructNew)
     
    12491249    RTSgBufInit(&SgBuf, &aSegs[0], RT_ELEMENTS(aSegs));
    12501250
    1251     return rtFdtStructAppendSg(pThis, &SgBuf, sizeof(u32Token) + cbPayload);
     1251    return rtFdtStructAppendSg(pThis, &SgBuf, sizeof(u32Token) + (uint32_t)cbPayload);
    12521252}
    12531253
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