VirtualBox

Changeset 30470 in vbox for trunk/src/VBox/Runtime


Ignore:
Timestamp:
Jun 28, 2010 2:03:18 PM (14 years ago)
Author:
vboxsync
Message:

RTSgBufInit: cSegs must be size_t so RT_ELEMENTS and similar will work without causing warnings.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/common/misc/sg.cpp

    r30468 r30470  
    6666
    6767
    68 RTDECL(void) RTSgBufInit(PRTSGBUF pSgBuf, PCRTSGSEG paSegs, unsigned cSegs)
     68RTDECL(void) RTSgBufInit(PRTSGBUF pSgBuf, PCRTSGSEG paSegs, size_t cSegs)
    6969{
    7070    AssertPtr(pSgBuf);
    7171    AssertPtr(paSegs);
    7272    Assert(cSegs > 0);
     73    Assert(cSegs < (~(unsigned)0 >> 1));
    7374
    7475    pSgBuf->paSegs    = paSegs;
    75     pSgBuf->cSegs     = cSegs;
     76    pSgBuf->cSegs     = (unsigned)cSegs;
    7677    pSgBuf->idxSeg    = 0;
    7778    pSgBuf->pvSegCur  = paSegs[0].pvSeg;
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