VirtualBox

儲存庫 vbox 的更動 18459


忽略:
時間撮記:
2009-3-28 上午04:54:55 (16 年 以前)
作者:
vboxsync
訊息:

SrvIntNetR0: size_t warnings.

檔案:
修改 1 筆資料

圖例:

未更動
新增
刪除
  • trunk/src/VBox/Devices/Network/SrvIntNetR0.cpp

    r17966 r18459  
    11751175     */
    11761176    PCRTNETIPV4 pIpHdr = (PCRTNETIPV4)((PCRTNETETHERHDR)pSG->aSegs[0].pv + 1);
    1177     size_t cbPacket = pSG->cbTotal - sizeof(RTNETETHERHDR);
     1177    uint32_t cbPacket = pSG->cbTotal - sizeof(RTNETETHERHDR);
    11781178    if (pSG->cSegsUsed > 1)
    11791179    {
     
    11941194        return;
    11951195    }
    1196     size_t cbIpHdr = pIpHdr->ip_hl * 4;
     1196    uint32_t cbIpHdr = pIpHdr->ip_hl * 4;
    11971197
    11981198    /*
     
    12251225     * Copy to temporary buffer if necessary.
    12261226     */
    1227     size_t cbPacket = RT_MIN(pSG->cbTotal, sizeof(RTNETARPIPV4));
     1227    uint32_t cbPacket = RT_MIN(pSG->cbTotal, sizeof(RTNETARPIPV4));
    12281228    PCRTNETARPIPV4 pArpIPv4 = (PCRTNETARPIPV4)((uintptr_t)pSG->aSegs[0].pv + sizeof(RTNETETHERHDR));
    12291229    if (    pSG->cSegsUsed != 1
     
    19791979     */
    19801980    PCRTNETIPV4 pIpHdr = (PCRTNETIPV4)((PCRTNETETHERHDR)pSG->aSegs[0].pv + 1);
    1981     size_t cbPacket = pSG->cbTotal - sizeof(RTNETETHERHDR);
     1981    uint32_t cbPacket = pSG->cbTotal - sizeof(RTNETETHERHDR);
    19821982    if (pSG->cSegsUsed > 1)
    19831983    {
     
    20352035                /* Patch flags */
    20362036                uint16_t uFlags = pDhcp->bp_flags | RT_H2BE_U16_C(RTNET_DHCP_FLAG_BROADCAST);
    2037                 intnetR0SgWritePart(pSG, (uint8_t*)&pDhcp->bp_flags - (uint8_t*)pIpHdr + sizeof(RTNETETHERHDR), sizeof(uFlags), &uFlags);
     2037                intnetR0SgWritePart(pSG, (uintptr_t)&pDhcp->bp_flags - (uintptr_t)pIpHdr + sizeof(RTNETETHERHDR), sizeof(uFlags), &uFlags);
    20382038                /* Patch UDP checksum */
    20392039                uint32_t uChecksum = (uint32_t)~pUdpHdr->uh_sum + RT_H2BE_U16_C(RTNET_DHCP_FLAG_BROADCAST);
     
    20412041                    uChecksum = (uChecksum >> 16) + (uChecksum & 0xFFFF);
    20422042                uChecksum = ~uChecksum;
    2043                 intnetR0SgWritePart(pSG, (uint8_t*)&pUdpHdr->uh_sum - (uint8_t*)pIpHdr + sizeof(RTNETETHERHDR), sizeof(pUdpHdr->uh_sum), &uChecksum);
     2043                intnetR0SgWritePart(pSG, (uintptr_t)&pUdpHdr->uh_sum - (uintptr_t)pIpHdr + sizeof(RTNETETHERHDR), sizeof(pUdpHdr->uh_sum), &uChecksum);
    20442044            }
    20452045            break;
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette