VirtualBox

Changeset 63015 in vbox for trunk/src/VBox/Devices/Network


Ignore:
Timestamp:
Aug 4, 2016 10:06:01 PM (8 years ago)
Author:
vboxsync
Message:

slirp: warnings

Location:
trunk/src/VBox/Devices/Network
Files:
5 added
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Network/slirp/bsd/amd64/in_cksum.c

    r43464 r63015  
    103103        union q_util q_util;
    104104
    105         if ((3 & (long) lw) == 0 && len == 20) {
     105        if ((3 & (intptr_t) lw) == 0 && len == 20) {
    106106             sum = (u_int64_t) lw[0] + lw[1] + lw[2] + lw[3] + lw[4];
    107107             REDUCE32;
     
    109109        }
    110110
    111         if ((offset = 3 & (long) lw) != 0) {
     111        if ((offset = 3 & (intptr_t) lw) != 0) {
    112112                const u_int32_t *masks = in_masks + (offset << 2);
    113113                lw = (u_int32_t *) (((RTHCUINTPTR) lw) - offset);
     
    225225                if (len < mlen)
    226226                        mlen = len;
    227                 if ((clen ^ (long) addr) & 1)
     227                if ((clen ^ (intptr_t) addr) & 1)
    228228                    sum += in_cksumdata(addr, mlen) << 8;
    229229                else
  • trunk/src/VBox/Devices/Network/slirp/bsd/kern/kern_mbuf.c

    r39101 r63015  
    529529{
    530530        struct mbuf *m;
    531         unsigned long flags;
     531        uintptr_t flags;
    532532#ifdef VBOX
    533     NOREF(pData);
     533        NOREF(pData);
    534534#endif
    535535
    536536        m = (struct mbuf *)mem;
    537         flags = (unsigned long)arg;
     537        flags = (uintptr_t)arg;
    538538
    539539        if ((flags & MB_NOTAGS) == 0 && (m->m_flags & M_PKTHDR) != 0)
     
    544544        trash_dtor(mem, size, arg);
    545545#elif defined(VBOX)
    546     NOREF(size);
    547     NOREF(arg);
     546        NOREF(size);
     547        NOREF(arg);
    548548#endif
    549549}
  • trunk/src/VBox/Devices/Network/slirp/bsd/kern/uipc_mbuf.c

    r53308 r63015  
    269269        /* Free attached storage if this mbuf is the only reference to it. */
    270270        if (*(m->m_ext.ref_cnt) == 1 ||
    271             atomic_fetchadd_int(m->m_ext.ref_cnt, -1) == 1) {
     271            atomic_fetchadd_int(m->m_ext.ref_cnt, (uint32_t)-1) == 1) {
    272272                switch (m->m_ext.ext_type) {
    273273                case EXT_PACKET:        /* The packet zone is special. */
     
    434434                                m_freem(pData, m->m_nextpkt);
    435435#endif
    436                                 m->m_nextpkt = (struct mbuf *)0xDEADC0DE;
     436                                m->m_nextpkt = (struct mbuf *)(uintptr_t)UINT32_C(0xDEADC0DE);
    437437                        } else
    438438                                M_SANITY_ACTION("m->m_nextpkt on in-chain mbuf");
  • trunk/src/VBox/Devices/Network/slirp/libalias/alias_ftp.c

    r52683 r63015  
    182182    handlers[0].fingerprint = &fingerprint;
    183183    handlers[0].protohandler = &protohandler;
    184     handlers[1].pri = EOH;
     184    handlers[1].pri = (u_int)EOH;
    185185#endif /* VBOX */
    186186
     
    728728
    729729/* Save string length for IP header modification */
    730             slen = strlen(stemp);
     730            slen = (int)strlen(stemp);
    731731
    732732/* Copy modified buffer into IP packet. */
  • trunk/src/VBox/Devices/Network/slirp/libalias/alias_nbt.c

    r62352 r63015  
    219219    handlers[2].protohandler = &protohandler2out;
    220220
    221     handlers[3].pri = EOH;
     221    handlers[3].pri = (u_int)EOH;
    222222#endif /* VBOX */
    223223
  • trunk/src/VBox/Devices/Network/slirp/libalias/alias_proxy.c

    r62353 r63015  
    427427
    428428/* Pad string out to a multiple of two in length */
    429     slen = strlen(buffer);
     429    slen = (int)strlen(buffer);
    430430    switch (slen % 2) {
    431431    case 0:
     
    693693/* Copy command line into a buffer */
    694694    cmd += strspn(cmd, " \t");
    695     cmd_len = strlen(cmd);
     695    cmd_len = (int)strlen(cmd);
    696696    if (cmd_len > (int)(sizeof(buffer) - 1)) {
    697697        ret = -1;
     
    701701
    702702/* Convert to lower case */
    703     len = strlen(buffer);
     703    len = (int)strlen(buffer);
    704704    for (i = 0; i < len; i++)
    705705        buffer[i] = tolower((unsigned char)buffer[i]);
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