VirtualBox

Ignore:
Timestamp:
Aug 10, 2016 1:34:15 PM (8 years ago)
Author:
vboxsync
Message:

NetworkServices: warnings

Location:
trunk/src/VBox/NetworkServices/NetLib
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/NetworkServices/NetLib/VBoxNetBaseService.cpp

    r62679 r63267  
    533533
    534534/* S/G API */
    535 int VBoxNetBaseService::sendBufferOnWire(PCINTNETSEG pcSg, int cSg, size_t cbFrame)
    536 {
     535int VBoxNetBaseService::sendBufferOnWire(PCINTNETSEG paSegs, size_t cSegs, size_t cbFrame)
     536{
     537    /* Allocate frame */
    537538    PINTNETHDR pHdr = NULL;
    538     uint8_t *pu8Frame = NULL;
    539 
    540     /* Allocate frame */
    541     int rc = IntNetRingAllocateFrame(&m->m_pIfBuf->Send, cbFrame, &pHdr, (void **)&pu8Frame);
     539    uint8_t *pbFrame = NULL;
     540    int rc = IntNetRingAllocateFrame(&m->m_pIfBuf->Send, (uint32_t)cbFrame, &pHdr, (void **)&pbFrame);
    542541    AssertRCReturn(rc, rc);
    543542
    544543    /* Now we fill pvFrame with S/G above */
    545     int offFrame = 0;
    546     for (int idxSg = 0; idxSg < cSg; ++idxSg)
    547     {
    548         memcpy(&pu8Frame[offFrame], pcSg[idxSg].pv, pcSg[idxSg].cb);
    549         offFrame+=pcSg[idxSg].cb;
     544    size_t offFrame = 0;
     545    for (size_t idxSeg = 0; idxSeg < cSegs; ++idxSeg)
     546    {
     547        memcpy(&pbFrame[offFrame], paSegs[idxSeg].pv, paSegs[idxSeg].cb);
     548        offFrame += paSegs[idxSeg].cb;
    550549    }
    551550
     
    817816void VBoxNetBaseService::debugPrintV(int iMinLevel, bool fMsg, const char *pszFmt, va_list va) const
    818817{
     818    RT_NOREF(fMsg);
    819819    if (iMinLevel <= m->m_cVerbosity)
    820820    {
     
    840840    {
    841841        PRTGETOPTDEF pOpt = m->m_vecOptionDefs[i];
    842         memcpy(&pOptArray[i], m->m_vecOptionDefs[i], sizeof(RTGETOPTDEF));
     842        memcpy(&pOptArray[i], pOpt, sizeof(*pOpt));
    843843    }
    844844    return pOptArray;
  • trunk/src/VBox/NetworkServices/NetLib/VBoxNetBaseService.h

    r62481 r63267  
    7070    int                 waitForIntNetEvent(int cMillis);
    7171    int                 abortWait();
    72     int                 sendBufferOnWire(PCINTNETSEG pSg, int cSg, size_t cbBuffer);
     72    int                 sendBufferOnWire(PCINTNETSEG paSegs, size_t cSegs, size_t cbBuffer);
    7373    void                flushWire();
    7474
  • trunk/src/VBox/NetworkServices/NetLib/VBoxNetIntIf.cpp

    r62481 r63267  
    8080int VBoxNetIntIfRingWriteFrame(PINTNETBUF pBuf, PINTNETRINGBUF pRingBuf, size_t cSegs, PCINTNETSEG paSegs)
    8181{
     82    RT_NOREF(pBuf);
     83
    8284    /*
    8385     * Validate input.
  • trunk/src/VBox/NetworkServices/NetLib/VBoxNetPortForwardString.cpp

    r62681 r63267  
    5555                                bool fEmptyAcceptable)
    5656{
    57     int idxRaw = 0;
    5857    int cbField = 0;
    5958
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