Changeset 64425 in vbox for trunk/src/VBox/Additions/common
- Timestamp:
- Oct 26, 2016 7:26:46 AM (8 years ago)
- svn:sync-xref-src-repo-rev:
- 111545
- Location:
- trunk/src/VBox/Additions/common/VBoxVideo
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxVideo/Modesetting.cpp
r64337 r64425 23 23 #ifndef VBOX_GUESTR3XF86MOD 24 24 # include <iprt/string.h> 25 #endif 26 27 #ifndef LINUX_VERSION_CODE 28 # define VBVOAssertPtr AssertPtr 29 #else 30 # define VBVOAssertPtr(a) do {} while(0) 25 31 #endif 26 32 … … 330 336 { 331 337 int rc; 332 AssertPtrReturn(paHints, VERR_INVALID_POINTER); 338 VBVOAssertPtr(paHints); 339 if (!VALID_PTR(paHints)) 340 return VERR_INVALID_POINTER; 333 341 void *p = VBoxHGSMIBufferAlloc(pCtx, sizeof(VBVAQUERYMODEHINTS) 334 342 + cScreens * sizeof(VBVAMODEHINT), -
trunk/src/VBox/Additions/common/VBoxVideo/VBVABase.cpp
r64156 r64425 21 21 #include <VBox/err.h> 22 22 // #include <VBox/log.h> 23 #include <iprt/assert.h> 23 #ifndef LINUX_VERSION_CODE 24 # include <iprt/assert.h> 25 # define VBVOAssert Assert 26 #else 27 # define VBVOAssert(a) do {} while(0) 28 #endif 24 29 #include <iprt/string.h> 25 30 … … 164 169 uint32_t indexRecordNext; 165 170 166 Assert(!pCtx->fHwBufferOverflow);167 Assert(pCtx->pRecord == NULL);171 VBVOAssert(!pCtx->fHwBufferOverflow); 172 VBVOAssert(pCtx->pRecord == NULL); 168 173 169 174 indexRecordNext = (pCtx->pVBVA->indexRecordFree + 1) % VBVA_MAX_RECORDS; … … 208 213 // LogFunc(("\n")); 209 214 210 Assert(pCtx->pVBVA);215 VBVOAssert(pCtx->pVBVA); 211 216 212 217 pRecord = pCtx->pRecord; 213 Assert(pRecord && (pRecord->cbRecord & VBVA_F_RECORD_PARTIAL));218 VBVOAssert(pRecord && (pRecord->cbRecord & VBVA_F_RECORD_PARTIAL)); 214 219 215 220 /* Mark the record completed. */ … … 290 295 291 296 VBVABUFFER *pVBVA = pCtx->pVBVA; 292 Assert(pVBVA);297 VBVOAssert(pVBVA); 293 298 294 299 if (!pVBVA || pCtx->fHwBufferOverflow) … … 297 302 } 298 303 299 Assert(pVBVA->indexRecordFirst != pVBVA->indexRecordFree);304 VBVOAssert(pVBVA->indexRecordFirst != pVBVA->indexRecordFree); 300 305 301 306 pRecord = pCtx->pRecord; 302 Assert(pRecord && (pRecord->cbRecord & VBVA_F_RECORD_PARTIAL));307 VBVOAssert(pRecord && (pRecord->cbRecord & VBVA_F_RECORD_PARTIAL)); 303 308 304 309 // LogFunc(("%d\n", cb)); … … 330 335 // LogFunc(("Buffer overflow!!!\n")); 331 336 pCtx->fHwBufferOverflow = true; 332 Assert(false);337 VBVOAssert(false); 333 338 return false; 334 339 } … … 338 343 } 339 344 340 Assert(cbChunk <= cb);341 Assert(cbChunk <= vboxHwBufferAvail (pVBVA));345 VBVOAssert(cbChunk <= cb); 346 VBVOAssert(cbChunk <= vboxHwBufferAvail (pVBVA)); 342 347 343 348 vboxHwBufferPlaceDataAt (pCtx, (uint8_t *)p + cbWritten, cbChunk, pVBVA->off32Free);
Note:
See TracChangeset
for help on using the changeset viewer.