VirtualBox

Changeset 107428 in vbox for trunk/src


Ignore:
Timestamp:
Jan 6, 2025 5:01:30 PM (13 days ago)
Author:
vboxsync
Message:

Devices/Security: Fix some harmless repeated expansion of macro argument with side-effects parfait warnings (the called functions don't have side effects), bugref:3409

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Security/DrvTpmEmu.cpp

    r106259 r107428  
    961961
    962962    /* Limit to the maximum buffer size of the device above. */
    963     pThis->cbBuffer = RT_MIN(pThis->cbBuffer, pThis->pTpmPort->pfnGetMaxBufferSize(pThis->pTpmPort));
     963    uint32_t const cbTpmBufferMax = pThis->pTpmPort->pfnGetMaxBufferSize(pThis->pTpmPort);
     964    pThis->cbBuffer = RT_MIN(pThis->cbBuffer, cbTpmBufferMax);
    964965
    965966    /* Set the buffer size. */
  • trunk/src/VBox/Devices/Security/DrvTpmEmuTpms.cpp

    r106259 r107428  
    544544
    545545    /* Limit to the buffer size of the device above. */
    546     pThis->cbBuffer = RT_MIN(pThis->cbBuffer, pThis->pTpmPort->pfnGetMaxBufferSize(pThis->pTpmPort));
     546    uint32_t const cbTpmBufferMax = pThis->pTpmPort->pfnGetMaxBufferSize(pThis->pTpmPort);
     547    pThis->cbBuffer = RT_MIN(pThis->cbBuffer, cbTpmBufferMax);
    547548
    548549    uint32_t cbBufferMin = 0;
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