Changeset 103528 in vbox
- Timestamp:
- Feb 22, 2024 11:29:39 AM (9 months ago)
- Location:
- trunk/src/VBox/Storage
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Storage/VDI.cpp
r103524 r103528 1643 1643 else if (pImage->paBlocks[uBlock] == VDI_IMAGE_BLOCK_ZERO) 1644 1644 { 1645 size_t cbSet; 1646 1647 cbSet = vdIfIoIntIoCtxSet(pImage->pIfIo, pIoCtx, 0, cbToRead); 1645 size_t cbSet = vdIfIoIntIoCtxSet(pImage->pIfIo, pIoCtx, 0, cbToRead); 1648 1646 Assert(cbSet == cbToRead); RT_NOREF(cbSet); 1649 1647 } … … 2821 2819 { 2822 2820 unsigned const cbBlock = getImageBlockSize(&pImage->Header); 2823 size_t const cbPreAllocated = offDiscard % cbBlock;2821 size_t const cbPreAllocated = offDiscard % RT_MAX(cbBlock, 1); /* MSVC thinks it is clever and says there is a potential mod by 0 here, hence the RT_MAX... */ 2824 2822 size_t const cbPostAllocated = getImageBlockSize(&pImage->Header) - cbDiscard - cbPreAllocated; 2825 2823 uint8_t *pbBlockData; -
trunk/src/VBox/Storage/VHD.cpp
r103526 r103528 838 838 { 839 839 uint64_t FileSize; 840 VHDFooter vhdFooter; 840 VHDFooter vhdFooter; RT_ZERO(vhdFooter); /* MSVC thinks this can be used uninitialized. */ 841 841 842 842 pImage->uOpenFlags = uOpenFlags;
Note:
See TracChangeset
for help on using the changeset viewer.