VirtualBox

Changeset 28135 in vbox


Ignore:
Timestamp:
Apr 9, 2010 10:09:00 AM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
59858
Message:

DevE1000: Fixed signed/unsigned compare warnings caused by type propagation (uint8_t -> signed int).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Network/DevE1000.cpp

    r28131 r28135  
    19541954    switch (uEtherType)
    19551955    {
    1956         /* @todo
     1956        /** @todo
    19571957         * It is not safe to bypass checksum verification for packets coming
    19581958         * from real wire. We currently unable to tell where packets are
     
    28652865
    28662866    /* IPv4 checksum offset. */
    2867     if (RT_UNLIKELY( pCtx->dw2.fIP && pCtx->ip.u8CSO - pCtx->ip.u8CSS != RT_UOFFSETOF(RTNETIPV4, ip_sum) ))
     2867    if (RT_UNLIKELY( pCtx->dw2.fIP && (size_t)pCtx->ip.u8CSO - pCtx->ip.u8CSS != RT_UOFFSETOF(RTNETIPV4, ip_sum) ))
    28682868    {
    28692869        E1kLog(("e1kSetupGsoCtx: IPCSO=%#x IPCSS=%#x\n", pCtx->ip.u8CSO, pCtx->ip.u8CSS));
     
    28722872
    28732873    /* TCP/UDP checksum offsets. */
    2874     if (RT_UNLIKELY( pCtx->tu.u8CSO - pCtx->tu.u8CSS != ( pCtx->dw2.fTCP
    2875                                                          ? RT_UOFFSETOF(RTNETTCP, th_sum)
    2876                                                          : RT_UOFFSETOF(RTNETUDP, uh_sum) ) ))
     2874    if (RT_UNLIKELY(   (size_t)pCtx->tu.u8CSO - pCtx->tu.u8CSS
     2875                    != ( pCtx->dw2.fTCP
     2876                         ? RT_UOFFSETOF(RTNETTCP, th_sum)
     2877                         : RT_UOFFSETOF(RTNETUDP, uh_sum) ) ))
    28772878    {
    28782879        E1kLog(("e1kSetupGsoCtx: TUCSO=%#x TUCSS=%#x TCP=%d\n", pCtx->ip.u8CSO, pCtx->ip.u8CSS, pCtx->dw2.fTCP));
     
    44104411            case 0x04: /* IODATA */
    44114412                rc = e1kRegRead(pState, pState->uSelectedReg, pu32, cb);
    4412                 /* @todo wrong return code triggers assertions in the debug build; fix please */
     4413                /** @todo wrong return code triggers assertions in the debug build; fix please */
    44134414                if (rc == VINF_IOM_HC_MMIO_READ)
    44144415                    rc = VINF_IOM_HC_IOPORT_READ;
     
    44644465                E1kLog2(("%s e1kIOPortOut: IODATA(4), writing to selected register %#010x, value=%#010x\n", szInst, pState->uSelectedReg, u32));
    44654466                rc = e1kRegWrite(pState, pState->uSelectedReg, &u32, cb);
    4466                 /* @todo wrong return code triggers assertions in the debug build; fix please */
     4467                /** @todo wrong return code triggers assertions in the debug build; fix please */
    44674468                if (rc == VINF_IOM_HC_MMIO_WRITE)
    44684469                    rc = VINF_IOM_HC_IOPORT_WRITE;
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