- Timestamp:
- Aug 3, 2016 3:15:39 PM (8 years ago)
- Location:
- trunk/src/VBox/Devices
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/DrvNetSniffer.cpp
r62511 r62926 297 297 static DECLCALLBACK(void) drvNetSnifferDetach(PPDMDRVINS pDrvIns, uint32_t fFlags) 298 298 { 299 RT_NOREF(fFlags); 299 300 PDRVNETSNIFFER pThis = PDMINS_2_DATA(pDrvIns, PDRVNETSNIFFER); 300 301 -
trunk/src/VBox/Devices/Storage/ATAPIPassthrough.cpp
r62506 r62926 298 298 static int atapiTrackListUpdateFromSendDvdStructure(PTRACKLIST pTrackList, const uint8_t *pbCDB, const void *pvBuf) 299 299 { 300 RT_NOREF(pTrackList, pbCDB, pvBuf); 300 301 return VERR_NOT_IMPLEMENTED; 301 302 } … … 313 314 bool fMSF, const uint8_t *pbBuf, uint32_t cbBuffer) 314 315 { 316 RT_NOREF(iTrack, cbBuffer); /** @todo unused parameters */ 315 317 int rc = VINF_SUCCESS; 316 318 unsigned cbToc = atapiBE2H_U16(pbBuf); … … 397 399 static int atapiTrackListUpdateFromReadTrackInformation(PTRACKLIST pTrackList, const uint8_t *pbCDB, const void *pvBuf) 398 400 { 401 RT_NOREF(pTrackList, pbCDB, pvBuf); 399 402 return VERR_NOT_IMPLEMENTED; 400 403 } … … 402 405 static int atapiTrackListUpdateFromReadDvdStructure(PTRACKLIST pTrackList, const uint8_t *pbCDB, const void *pvBuf) 403 406 { 407 RT_NOREF(pTrackList, pbCDB, pvBuf); 404 408 return VERR_NOT_IMPLEMENTED; 405 409 } … … 407 411 static int atapiTrackListUpdateFromReadDiscInformation(PTRACKLIST pTrackList, const uint8_t *pbCDB, const void *pvBuf) 408 412 { 413 RT_NOREF(pTrackList, pbCDB, pvBuf); 409 414 return VERR_NOT_IMPLEMENTED; 410 415 } -
trunk/src/VBox/Devices/Storage/IOBufMgmt.cpp
r62463 r62926 97 97 } 98 98 99 DECLINLINE(uint32_t) iobufMgrGetObjCount(size_t cbMem, unsigned cBins, size_t cbMin )100 { 101 uint32_t cObjCnt= 0;102 uint32_t cbBin = cbMin;99 DECLINLINE(uint32_t) iobufMgrGetObjCount(size_t cbMem, unsigned cBins, size_t cbMinBin) 100 { 101 size_t cObjs = 0; 102 size_t cbBin = cbMinBin; 103 103 104 104 while (cBins-- > 0) 105 105 { 106 cObj Cnt+= cbMem / cbBin;106 cObjs += cbMem / cbBin; 107 107 cbBin <<= 1; /* The size doubles for every bin. */ 108 108 } 109 109 110 return cObjCnt; 110 Assert((uint32_t)cObjs == cObjs); 111 return (uint32_t)cObjs; 111 112 } 112 113 … … 145 146 { 146 147 /* Init the bins. */ 147 uint32_t iObj= 0;148 size_t iObj = 0; 148 149 uint32_t cbBin = IOBUFMGR_BIN_SIZE_MIN; 149 150 for (unsigned i = 0; i < cBins; i++) … … 262 263 iBinCur--; 263 264 pBinCur = &pThis->paBins[iBinCur]; 264 pBinCur->papvFree[pBinCur->iFree] = pbMem + ( RT_BIT(iBinCur + pThis->u32OrderMin));265 pBinCur->papvFree[pBinCur->iFree] = pbMem + (size_t)RT_BIT(iBinCur + pThis->u32OrderMin); /* (RT_BIT causes weird MSC warning without cast) */ 265 266 pBinCur->iFree++; 266 267 } … … 280 281 /* 281 282 * If we didn't find something in the higher bins try to accumulate as much as possible from the smaller bins. 282 * @todo: Defragment in case there is enough memory free but we can't find something in our bin.283 283 */ 284 /** @todo Defragment in case there is enough memory free but we can't find something in our bin. */ 284 285 if ( pBin->iFree == 0 285 286 && iBin > 0) … … 294 295 pBin->iFree--; 295 296 pSeg->pvSeg = pBin->papvFree[pBin->iFree]; 296 pSeg->cbSeg = RT_BIT_32(iBin + pThis->u32OrderMin);297 pSeg->cbSeg = (size_t)RT_BIT_32(iBin + pThis->u32OrderMin); 297 298 AssertPtr(pSeg->pvSeg); 298 299 cbAlloc = pSeg->cbSeg; … … 306 307 pBin->iFree--; 307 308 pSeg->pvSeg = pBin->papvFree[pBin->iFree]; 308 pSeg->cbSeg = RT_BIT_32(u32Order);309 pSeg->cbSeg = (size_t)RT_BIT_32(u32Order); 309 310 cbAlloc = pSeg->cbSeg; 310 311 AssertPtr(pSeg->pvSeg); … … 328 329 { 329 330 unsigned iSeg = 0; 330 unsignedcbLeft = cbIoBuf;331 size_t cbLeft = cbIoBuf; 331 332 PRTSGSEG pSeg = &pIoBufDesc->Int.aSegs[0]; 332 333 … … 382 383 pBin->papvFree[pBin->iFree] = pSeg->pvSeg; 383 384 pBin->iFree++; 384 pThis->cbFree += RT_BIT_32(u32Order);385 pThis->cbFree += (size_t)RT_BIT_32(u32Order); 385 386 } 386 387 RTCritSectLeave(&pThis->CritSectAlloc);
Note:
See TracChangeset
for help on using the changeset viewer.