VirtualBox

Changeset 106599 in vbox


Ignore:
Timestamp:
Oct 23, 2024 12:54:21 AM (5 weeks ago)
Author:
vboxsync
Message:

DevPlatform: Warnings. jiraref:VBP-1171

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Misc/DevPlatform.cpp

    r106061 r106599  
    263263        {
    264264            if (!pIt->fResourceId)
    265                 RTFileReadAllFree(pIt->pu8ResourceFree, (size_t)pIt->cbResource);
     265                RTFileReadAllFree(pIt->pu8ResourceFree, pIt->cbResource);
    266266            else
    267267                PDMDevHlpMMHeapFree(pDevIns, pIt->pu8ResourceFree);
     
    307307    RTListForEach(&pThis->LstResourcesMem, pIt, DEVPLATFORMRESOURCE, NdLst)
    308308    {
    309         int rc = platformR3ResourceResolveContent(pDevIns, pThis, pIt, (void **)&pIt->pu8ResourceFree, (const void **)&pIt->pu8Resource, &pIt->cbResource);
     309        int rc = platformR3ResourceResolveContent(pDevIns, pThis, pIt, (void **)&pIt->pu8ResourceFree,
     310                                                  (const void **)&pIt->pu8Resource, &pIt->cbResource);
    310311        if (RT_SUCCESS(rc))
    311312        {
     
    316317            {
    317318                if (!pIt->fResourceId)
    318                     RTFileReadAllFree(pIt->pu8ResourceFree, (size_t)pIt->cbResource);
     319                    RTFileReadAllFree(pIt->pu8ResourceFree, pIt->cbResource);
    319320                else
    320321                    PDMDevHlpMMHeapFree(pDevIns, pIt->pu8ResourceFree);
     
    379380    RTListForEach(&pThis->LstResourcesRom, pIt, DEVPLATFORMRESOURCE, NdLst)
    380381    {
    381         rc = platformR3ResourceResolveContent(pDevIns, pThis, pIt, (void **)&pIt->pu8ResourceFree, (void const **)&pIt->pu8Resource, &pIt->cbResource);
     382        rc = platformR3ResourceResolveContent(pDevIns, pThis, pIt, (void **)&pIt->pu8ResourceFree,
     383                                              (void const **)&pIt->pu8Resource, &pIt->cbResource);
    382384        if (RT_SUCCESS(rc))
    383             rc = PDMDevHlpROMRegister(pDevIns, platformR3ResourceGetLoadAddress(pDevIns, pIt), pIt->cbResource, pIt->pu8Resource, pIt->cbResource,
     385        {
     386            AssertLogRel((uint32_t)pIt->cbResource == pIt->cbResource);
     387            rc = PDMDevHlpROMRegister(pDevIns, platformR3ResourceGetLoadAddress(pDevIns, pIt),
     388                                      (uint32_t)pIt->cbResource, pIt->pu8Resource, (uint32_t)pIt->cbResource,
    384389                                      PGMPHYS_ROM_FLAGS_SHADOWED | PGMPHYS_ROM_FLAGS_PERMANENT_BINARY, pIt->szName);
     390        }
    385391        AssertRCReturn(rc, rc);
    386392    }
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