VirtualBox

Changeset 63277 in vbox for trunk/src/VBox/NetworkServices


Ignore:
Timestamp:
Aug 10, 2016 2:31:08 PM (9 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
109910
Message:

NetworkServices: warnings

Location:
trunk/src/VBox/NetworkServices/NAT
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/NetworkServices/NAT/pxdns.c

    r62481 r63277  
    313313
    314314    if (g_proxy_options->nameservers != NULL) {
    315         RTMemFree(g_proxy_options->nameservers);
     315        RTMemFree((void *)g_proxy_options->nameservers);
    316316    }
    317317    g_proxy_options->nameservers = nameservers;
     
    703703    union sockaddr_inet *resolver;
    704704    ssize_t nsent;
     705#ifdef RT_OS_WINDOWS
     706    const char *pSendData = (const char *)&req->data[0];
     707    int         cbSendData = (int)req->size;
     708    Assert((size_t)cbSendData == req->size);
     709#else
     710    const void *pSendData = &req->data[0];
     711    size_t      cbSendData = req->size;
     712#endif
    705713
    706714    DPRINTF2(("%s: req %p: sending to resolver #%lu\n",
     
    712720
    713721    if (resolver->sa.sa_family == AF_INET) {
    714         nsent = sendto(pxdns->sock4, req->data, req->size, 0,
     722        nsent = sendto(pxdns->sock4, pSendData, cbSendData, 0,
    715723                       &resolver->sa, sizeof(resolver->sin));
    716724
     
    718726    else if (resolver->sa.sa_family == AF_INET6) {
    719727        if (pxdns->sock6 != INVALID_SOCKET) {
    720             nsent = sendto(pxdns->sock6, req->data, req->size, 0,
     728            nsent = sendto(pxdns->sock6, pSendData, cbSendData, 0,
    721729                           &resolver->sa, sizeof(resolver->sin6));
    722730        }
     
    816824
    817825
     826#ifdef RT_OS_WINDOWS
     827    nread = recv(fd, (char *)pollmgr_udpbuf, sizeof(pollmgr_udpbuf), 0);
     828#else
    818829    nread = recv(fd, pollmgr_udpbuf, sizeof(pollmgr_udpbuf), 0);
     830#endif
    819831    if (nread < 0) {
    820832        DPRINTF(("%s: %R[sockerr]\n", __func__, SOCKERRNO()));
  • trunk/src/VBox/NetworkServices/NAT/pxtcp.c

    r62481 r63277  
    11161116{
    11171117    struct pxtcp *pxtcp;
     1118    RT_NOREF(fd);
    11181119
    11191120    pxtcp = (struct pxtcp *)handler->data;
     
    16901691    int status;
    16911692    int sockerr;
     1693    RT_NOREF(fd);
    16921694
    16931695    pxtcp = (struct pxtcp *)handler->data;
     
    21442146            }
    21452147
    2146             error = tcp_write(pcb, &pxtcp->inbuf.buf[beg], toeob, maybemore);
     2148            Assert(toeob == (u16)toeob);
     2149            error = tcp_write(pcb, &pxtcp->inbuf.buf[beg], (u16_t)toeob, maybemore);
    21472150            if (error != ERR_OK) {
    21482151                goto writeerr;
  • trunk/src/VBox/NetworkServices/NAT/pxudp.c

    r62481 r63277  
    599599         * valid for SOCK_RAW.
    600600         */
    601 #     define USE_DF_OPTION(_Optname)                    \
    602         const int dfopt = _Optname;                     \
    603         const char * const dfoptname = #_Optname;
     601#     define USE_DF_OPTION(_Optname) \
     602            const int dfopt = _Optname; \
     603            const char * const dfoptname = #_Optname; \
     604            RT_NOREF_PV(dfoptname)
    604605#if   defined(IP_MTU_DISCOVER)  /* Linux */
    605606        USE_DF_OPTION(IP_MTU_DISCOVER);
     
    759760    }
    760761
     762#ifdef RT_OS_WINDOWS
     763    nread = recv(pxudp->sock, (char *)pollmgr_udpbuf, sizeof(pollmgr_udpbuf), 0);
     764#else
    761765    nread = recv(pxudp->sock, pollmgr_udpbuf, sizeof(pollmgr_udpbuf), 0);
     766#endif
    762767    if (nread == SOCKET_ERROR) {
    763768        DPRINTF(("%s: %R[sockerr]\n", __func__, SOCKERRNO()));
Note: See TracChangeset for help on using the changeset viewer.

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