Changeset 83739 in vbox for trunk/src/VBox/Runtime
- Timestamp:
- Apr 17, 2020 8:51:27 AM (5 years ago)
- Location:
- trunk/src/VBox/Runtime
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/common/fs/isovfs.cpp
r82968 r83739 834 834 else 835 835 { 836 size_t cbSkip = (offDirRec + pVol->cbSector) & ~(pVol->cbSector - 1U);836 uint64_t cbSkip = (offDirRec + pVol->cbSector) & ~(uint64_t)(pVol->cbSector - 1U); 837 837 offDirRec += cbSkip; 838 pDirRec = (PCISO9660DIRREC)((uintptr_t)pDirRec + cbSkip);838 pDirRec = (PCISO9660DIRREC)((uintptr_t)pDirRec + (size_t)cbSkip); 839 839 } 840 840 } -
trunk/src/VBox/Runtime/common/fs/ntfsvfs.cpp
r82968 r83739 4522 4522 */ 4523 4523 Assert(RT_IS_POWER_OF_TWO(pThis->cbBitmapAlloc)); 4524 uint64_t offLoad = offInBitmap & ~( pThis->cbBitmapAlloc - 1);4524 uint64_t offLoad = offInBitmap & ~(uint64_t)(pThis->cbBitmapAlloc - 1); 4525 4525 uint32_t cbLoad = (uint32_t)RT_MIN(cbWholeBitmap - offLoad, pThis->cbBitmapAlloc); 4526 4526 -
trunk/src/VBox/Runtime/common/misc/lockvalidator.cpp
r82968 r83739 2727 2727 case RTLOCKVALRECSHRDOWN_MAGIC_DEAD: 2728 2728 default: 2729 AssertMsgFailed(("%p: %#x\n", pRec, pRec->Core ));2729 AssertMsgFailed(("%p: %#x\n", pRec, pRec->Core.u32Magic)); 2730 2730 break; 2731 2731 } -
trunk/src/VBox/Runtime/r3/win/fileio-win.cpp
r82968 r83739 512 512 while (cbToReadAdj > cbRead) 513 513 { 514 ULONG cbToRead 515 ULONG cbReadPart = 0;516 if (!ReadFile((HANDLE)RTFileToNative(hFile), (char *)pvBuf + cbRead, cbToRead , &cbReadPart, NULL))514 ULONG cbToReadNow = RT_MIN(cbChunk, cbToReadAdj - cbRead); 515 ULONG cbReadPart = 0; 516 if (!ReadFile((HANDLE)RTFileToNative(hFile), (char *)pvBuf + cbRead, cbToReadNow, &cbReadPart, NULL)) 517 517 { 518 518 /* If we failed because the buffer is too big, shrink it and … … 650 650 while (cbWritten < cbToWriteAdj) 651 651 { 652 ULONG cbToWrite 652 ULONG cbToWriteNow = RT_MIN(cbChunk, cbToWriteAdj - cbWritten); 653 653 ULONG cbWrittenPart = 0; 654 if (!WriteFile((HANDLE)RTFileToNative(hFile), (const char *)pvBuf + cbWritten, cbToWrite , &cbWrittenPart, NULL))654 if (!WriteFile((HANDLE)RTFileToNative(hFile), (const char *)pvBuf + cbWritten, cbToWriteNow, &cbWrittenPart, NULL)) 655 655 { 656 656 /* If we failed because the buffer is too big, shrink it and … … 665 665 int rc = RTErrConvertFromWin32(dwErr); 666 666 if (rc == VERR_DISK_FULL) 667 rc = rtFileWinCheckIfDiskReallyFull(hFile, RTFileTell(hFile) + cbToWrite );667 rc = rtFileWinCheckIfDiskReallyFull(hFile, RTFileTell(hFile) + cbToWriteNow); 668 668 return rc; 669 669 } … … 893 893 InitializeObjectAttributes(&ObjAttr, &NtName, BasicInfo.Attributes & ~OBJ_INHERIT, NULL, NULL); 894 894 895 NTSTATUSrcNt = NtCreateFile(&hDupFile,896 897 898 899 900 901 902 903 904 905 895 rcNt = NtCreateFile(&hDupFile, 896 BasicInfo.GrantedAccess | FILE_WRITE_DATA, 897 &ObjAttr, 898 &Ios, 899 NULL /* AllocationSize*/, 900 FILE_ATTRIBUTE_NORMAL, 901 FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, 902 FILE_OPEN, 903 FILE_OPEN_FOR_BACKUP_INTENT /*??*/, 904 NULL /*EaBuffer*/, 905 0 /*EaLength*/); 906 906 RTUtf16Free(NtName.Buffer); 907 907 if (NT_SUCCESS(rcNt)) -
trunk/src/VBox/Runtime/r3/win/timer-win.cpp
r82968 r83739 245 245 # ifdef USE_CATCH_UP 246 246 pTimer->llNext.QuadPart += NSInterval; 247 LARGE_INTEGER ll;248 247 ll.QuadPart = RTTimeNanoTS() - pTimer->llNext.QuadPart; 249 248 if (ll.QuadPart < -500000) … … 252 251 ll.QuadPart = -500000 / 100; /* need to catch up, do a minimum wait of 0.5ms. */ 253 252 # else 254 LARGE_INTEGERll = pTimer->llNext;253 ll = pTimer->llNext; 255 254 # endif 256 255 BOOL fRc = SetWaitableTimer(pTimer->hTimer, &ll, 0, NULL, NULL, FALSE);
Note:
See TracChangeset
for help on using the changeset viewer.