Index: trunk/src/VBox/Devices/Network/slirp/bootp.c
===================================================================
--- trunk/src/VBox/Devices/Network/slirp/bootp.c	(revision 39091)
+++ trunk/src/VBox/Devices/Network/slirp/bootp.c	(revision 39101)
@@ -392,5 +392,5 @@
 };
 
-static int dhcp_decode_request(PNATState pData, struct bootp_t *bp, const uint8_t *buf, int size, struct mbuf *m)
+static int dhcp_decode_request(PNATState pData, struct bootp_t *bp, struct mbuf *m)
 {
     BOOTPClient *bc = NULL;
@@ -508,5 +508,5 @@
 }
 
-static int dhcp_decode_discover(PNATState pData, struct bootp_t *bp, const uint8_t *buf, int size, int fDhcpDiscover, struct mbuf *m)
+static int dhcp_decode_discover(PNATState pData, struct bootp_t *bp, int fDhcpDiscover, struct mbuf *m)
 {
     BOOTPClient *bc;
@@ -551,5 +551,5 @@
 }
 
-static int dhcp_decode_release(PNATState pData, struct bootp_t *bp, const uint8_t *buf, int size)
+static int dhcp_decode_release(PNATState pData, struct bootp_t *bp)
 {
     int rc = release_addr(pData, &bp->bp_ciaddr);
@@ -682,5 +682,5 @@
             /* fall through */
         case DHCPINFORM:
-            rc = dhcp_decode_discover(pData, bp, buf, size, fDhcpDiscover, m);
+            rc = dhcp_decode_discover(pData, bp, fDhcpDiscover, m);
             if (rc > 0)
                 goto reply;
@@ -688,5 +688,5 @@
 
         case DHCPREQUEST:
-            rc = dhcp_decode_request(pData, bp, buf, size, m);
+            rc = dhcp_decode_request(pData, bp, m);
             if (rc > 0)
                 goto reply;
@@ -694,5 +694,5 @@
 
         case DHCPRELEASE:
-            rc = dhcp_decode_release(pData, bp, buf, size);
+            rc = dhcp_decode_release(pData, bp);
             /* no reply required */
             break;
Index: trunk/src/VBox/Devices/Network/slirp/bsd/kern/kern_mbuf.c
===================================================================
--- trunk/src/VBox/Devices/Network/slirp/bsd/kern/kern_mbuf.c	(revision 39091)
+++ trunk/src/VBox/Devices/Network/slirp/bsd/kern/kern_mbuf.c	(revision 39101)
@@ -131,4 +131,5 @@
 SYSINIT(tunable_mbinit, SI_SUB_TUNABLES, SI_ORDER_MIDDLE, tunable_mbinit, NULL);
 
+#ifndef VBOX
 /* XXX: These should be tuneables. Can't change UMA limits on the fly. */
 static int
@@ -222,5 +223,4 @@
  * Zones from which we allocate.
  */
-#ifndef VBOX
 uma_zone_t	zone_mbuf;
 uma_zone_t	zone_clust;
@@ -470,7 +470,13 @@
 	int flags;
 	short type;
+#ifdef VBOX
+    NOREF(pData);
+#endif
 
 #ifdef INVARIANTS
 	trash_ctor(mem, size, arg, how);
+#elif defined(VBOX)
+    NOREF(size);
+    NOREF(how);
 #endif
 	m = (struct mbuf *)mem;
@@ -524,4 +530,7 @@
 	struct mbuf *m;
 	unsigned long flags;
+#ifdef VBOX
+    NOREF(pData);
+#endif
 
 	m = (struct mbuf *)mem;
@@ -534,4 +543,7 @@
 #ifdef INVARIANTS
 	trash_dtor(mem, size, arg);
+#elif defined(VBOX)
+    NOREF(size);
+    NOREF(arg);
 #endif
 }
@@ -563,4 +575,7 @@
 #ifdef INVARIANTS
 	trash_dtor(m->m_ext.ext_buf, MCLBYTES, arg);
+#elif defined(VBOX)
+    NOREF(size);
+    NOREF(arg);
 #endif
 	/*
@@ -593,7 +608,12 @@
 	int type;
 	uma_zone_t zone;
+#ifdef VBOX
+    NOREF(how);
+#endif
 
 #ifdef INVARIANTS
 	trash_ctor(mem, size, arg, how);
+#elif defined(VBOX)
+    NOREF(how);
 #endif
 	switch (size) {
@@ -657,4 +677,9 @@
 
 	trash_dtor(mem, size, arg);
+#elif defined(VBOX)
+    NOREF(pData);
+    NOREF(mem);
+    NOREF(size);
+    NOREF(arg);
 #endif
 }
@@ -680,4 +705,6 @@
 #ifdef INVARIANTS
 	trash_init(m->m_ext.ext_buf, MCLBYTES, how);
+#elif defined(VBOX)
+    NOREF(size);
 #endif
 	return (0);
@@ -704,4 +731,6 @@
 #ifdef INVARIANTS
 	trash_dtor(mem, size, NULL);
+#elif defined(VBOX)
+    NOREF(size);
 #endif
 }
@@ -724,4 +753,8 @@
 	int flags;
 	short type;
+#ifdef VBOX
+    NOREF(pData);
+    NOREF(size);
+#endif
 
 	m = (struct mbuf *)mem;
@@ -732,4 +765,6 @@
 #ifdef INVARIANTS
 	trash_ctor(m->m_ext.ext_buf, MCLBYTES, arg, how);
+#elif defined(VBOX)
+    NOREF(how);
 #endif
 	m->m_next = NULL;
@@ -782,4 +817,6 @@
 			if (pr->pr_drain != NULL)
 				(*pr->pr_drain)();
-#endif
-}
+#else
+    NOREF(junk);
+#endif
+}
Index: trunk/src/VBox/Devices/Network/slirp/bsd/kern/uipc_mbuf2.c
===================================================================
--- trunk/src/VBox/Devices/Network/slirp/bsd/kern/uipc_mbuf2.c	(revision 39091)
+++ trunk/src/VBox/Devices/Network/slirp/bsd/kern/uipc_mbuf2.c	(revision 39101)
@@ -406,4 +406,5 @@
 	t = malloc(len + sizeof(struct m_tag), M_PACKET_TAGS, fWait);
 #else
+        NOREF(fWait);
 	t = RTMemAllocZ(len + sizeof(struct m_tag));
 #endif
Index: trunk/src/VBox/Devices/Network/slirp/debug.c
===================================================================
--- trunk/src/VBox/Devices/Network/slirp/debug.c	(revision 39091)
+++ trunk/src/VBox/Devices/Network/slirp/debug.c	(revision 39101)
@@ -304,4 +304,8 @@
     size_t cb = 0;
     const struct tcpcb *tp = (const struct tcpcb *)pvValue;
+    NOREF(cchWidth);
+    NOREF(cchPrecision);
+    NOREF(fFlags);
+    NOREF(pvUser);
     AssertReturn(RTStrCmp(pszType, "tcpcb793") == 0, 0);
     if (tp)
@@ -328,4 +332,8 @@
     size_t cb = 0;
     const struct tcpiphdr *ti = (const struct tcpiphdr *)pvValue;
+    NOREF(cchWidth);
+    NOREF(cchPrecision);
+    NOREF(fFlags);
+    NOREF(pvUser);
     AssertReturn(RTStrCmp(pszType, "tcpseg793") == 0 && ti, 0);
     cb += RTStrFormat(pfnOutput, pvArgOutput, NULL, 0, "SEG[ACK: %x, SEQ: %x, LEN: %x, WND: %x, UP: %x]",
@@ -346,4 +354,8 @@
     const int idxTcpState = (int)(uintptr_t)pvValue;
     char *pszTcpStateName = (idxTcpState >= 0 && idxTcpState < TCP_NSTATES) ? g_apszTcpStates[idxTcpState] : "TCPS_INVALIDE_STATE";
+    NOREF(cchWidth);
+    NOREF(cchPrecision);
+    NOREF(fFlags);
+    NOREF(pvUser);
     AssertReturn(RTStrCmp(pszType, "tcpstate") == 0, 0);
     cb += RTStrFormat(pfnOutput, pvArgOutput, NULL, 0, "%s", pszTcpStateName);
@@ -362,4 +374,8 @@
     size_t cb = 0;
     const struct sbuf *sb = (struct sbuf *)pvValue;
+    NOREF(cchWidth);
+    NOREF(cchPrecision);
+    NOREF(fFlags);
+    NOREF(pvUser);
     AssertReturn(RTStrCmp(pszType, "sbuf") == 0, 0);
     cb += RTStrFormat(pfnOutput, pvArgOutput, NULL, 0, "[sbuf:%p cc:%d, datalen:%d, wprt:%p, rptr:%p data:%p]",
@@ -379,4 +395,8 @@
     size_t cb = 0;
     const uma_zone_t zone = (const uma_zone_t)pvValue;
+    NOREF(cchWidth);
+    NOREF(cchPrecision);
+    NOREF(fFlags);
+    NOREF(pvUser);
     AssertReturn(RTStrCmp(pszType, "mzone") == 0, 0);
     if (!zone)
@@ -399,4 +419,8 @@
     size_t cb = 0;
     const struct item *it = (const struct item *)pvValue;
+    NOREF(cchWidth);
+    NOREF(cchPrecision);
+    NOREF(fFlags);
+    NOREF(pvUser);
     AssertReturn(RTStrCmp(pszType, "mzoneitem") == 0, 0);
     if (!it)
@@ -415,4 +439,8 @@
 {
     size_t cb = 0;
+    NOREF(cchWidth);
+    NOREF(cchPrecision);
+    NOREF(fFlags);
+    NOREF(pvUser);
 #ifdef RT_OS_WINDOWS
     WSANETWORKEVENTS *pNetworkEvents = (WSANETWORKEVENTS*)pvValue;
@@ -440,4 +468,9 @@
 # undef DO_BIT
     cb += RTStrFormat(pfnOutput, pvArgOutput, NULL, 0, ")");
+#else
+    NOREF(pfnOutput);
+    NOREF(pvArgOutput);
+    NOREF(pszType);
+    NOREF(pvValue);
 #endif
     return cb;
Index: trunk/src/VBox/Devices/Network/slirp/ext.h
===================================================================
--- trunk/src/VBox/Devices/Network/slirp/ext.h	(revision 39091)
+++ trunk/src/VBox/Devices/Network/slirp/ext.h	(revision 39101)
@@ -64,5 +64,5 @@
 #endif
 
-#ifndef vbox_slirp_printf
+# ifndef vbox_slirp_printf
 static void vbox_slirp_printf(char *format, ...)
 {
@@ -72,10 +72,10 @@
     va_end(args);
 }
-#endif
+# endif
 
-#ifndef vbox_slirp_fprintf
+# ifndef vbox_slirp_fprintf
 static void vbox_slirp_fprintf(void *ignored, char *format, ...)
 {
-# ifdef LOG_ENABLED
+#  ifdef LOG_ENABLED
     va_list args;
     NOREF(ignored);
@@ -83,6 +83,6 @@
     vbox_slirp_printV(format, args);
     va_end(args);
+#  endif
+}
 # endif
-}
 #endif
-#endif
Index: trunk/src/VBox/Devices/Network/slirp/ip_icmp.c
===================================================================
--- trunk/src/VBox/Devices/Network/slirp/ip_icmp.c	(revision 39091)
+++ trunk/src/VBox/Devices/Network/slirp/ip_icmp.c	(revision 39101)
@@ -54,4 +54,5 @@
  */
 
+#define NEED_SOME_m_getjcl
 #include "slirp.h"
 #include "ip_icmp.h"
@@ -749,7 +750,4 @@
     return;
 
-end_error_free_m:
-    m_freem(pData, m);
-
 end_error:
 
Index: trunk/src/VBox/Devices/Network/slirp/ip_input.c
===================================================================
--- trunk/src/VBox/Devices/Network/slirp/ip_input.c	(revision 39091)
+++ trunk/src/VBox/Devices/Network/slirp/ip_input.c	(revision 39101)
@@ -626,4 +626,5 @@
     register caddr_t opts;
     int olen;
+    NOREF(mopt); /* @todo: do we really will need this options buffer? */
 
     olen = (ip->ip_hl<<2) - sizeof(struct ip);
Index: trunk/src/VBox/Devices/Network/slirp/libalias/alias.c
===================================================================
--- trunk/src/VBox/Devices/Network/slirp/libalias/alias.c	(revision 39091)
+++ trunk/src/VBox/Devices/Network/slirp/libalias/alias.c	(revision 39101)
@@ -1641,5 +1641,7 @@
 
     LibAliasAttachHandlers(m);
-#endif /* !VBOX */
+#else /* !VBOX */
+    NOREF(path);
+#endif /* VBOX */
     return (0);
 }
Index: trunk/src/VBox/Devices/Network/slirp/libalias/alias_db.c
===================================================================
--- trunk/src/VBox/Devices/Network/slirp/libalias/alias_db.c	(revision 39091)
+++ trunk/src/VBox/Devices/Network/slirp/libalias/alias_db.c	(revision 39101)
@@ -508,4 +508,5 @@
     va_list args;
     char buffer[1024];
+    NOREF(stream);
     memset(buffer, 0, 1024);
     va_start(args, format);
@@ -726,4 +727,5 @@
     struct sockaddr sa_addr;
     socklen_t socklen = sizeof(struct sockaddr);
+    NOREF(sockfd);
 #endif
 
@@ -3024,4 +3026,9 @@
 {
 
+#ifdef VBOX
+    NOREF(la);
+    NOREF(base);
+    NOREF(num);
+#endif
     LIBALIAS_LOCK(la);
 #ifndef NO_FW_PUNCH
Index: trunk/src/VBox/Devices/Network/slirp/libalias/alias_dns.c
===================================================================
--- trunk/src/VBox/Devices/Network/slirp/libalias/alias_dns.c	(revision 39091)
+++ trunk/src/VBox/Devices/Network/slirp/libalias/alias_dns.c	(revision 39101)
@@ -76,4 +76,6 @@
 {
 
+    NOREF(la);
+    NOREF(pip);
     if (!ah->dport || !ah->sport || !ah->lnk)
         return -1;
@@ -91,5 +93,5 @@
 }
 
-static void doanswer(struct libalias *la, union dnsmsg_header *hdr, struct dns_meta_data *pReqMeta, char *qname, struct ip *pip, struct hostent *h)
+static void doanswer(union dnsmsg_header *hdr, struct dns_meta_data *pReqMeta, char *qname, struct ip *pip, struct hostent *h)
 {
     int i;
@@ -185,4 +187,5 @@
     }
 }
+
 static int
 protohandler(struct libalias *la, struct ip *pip, struct alias_data *ah)
@@ -198,4 +201,6 @@
     struct udphdr *udp = NULL;
     union dnsmsg_header *hdr = NULL;
+    NOREF(la);
+    NOREF(ah);
     udp = (struct udphdr *)ip_next(pip);
     hdr = (union dnsmsg_header *)udp_next(udp);
@@ -239,5 +244,5 @@
         h = gethostbyname(cname);
         fprintf(stderr, "cname:%s\n", cname);
-        doanswer(la, hdr, meta, qw_qname, pip, h);
+        doanswer(hdr, meta, qw_qname, pip, h);
     }
 
Index: trunk/src/VBox/Devices/Network/slirp/libalias/alias_ftp.c
===================================================================
--- trunk/src/VBox/Devices/Network/slirp/libalias/alias_ftp.c	(revision 39091)
+++ trunk/src/VBox/Devices/Network/slirp/libalias/alias_ftp.c	(revision 39101)
@@ -116,4 +116,8 @@
 {
 
+#ifdef VBOX
+    NOREF(la);
+    NOREF(pip);
+#endif
     if (ah->dport == NULL || ah->sport == NULL || ah->lnk == NULL ||
         ah->maxpktsize == 0)
Index: trunk/src/VBox/Devices/Network/slirp/libalias/alias_nbt.c
===================================================================
--- trunk/src/VBox/Devices/Network/slirp/libalias/alias_nbt.c	(revision 39091)
+++ trunk/src/VBox/Devices/Network/slirp/libalias/alias_nbt.c	(revision 39101)
@@ -88,4 +88,8 @@
 {
 
+#ifdef VBOX
+    NOREF(la);
+    NOREF(pip);
+#endif
     if (ah->dport == NULL || ah->sport == NULL || ah->lnk == NULL ||
         ah->aaddr == NULL || ah->aport == NULL)
@@ -109,4 +113,8 @@
 {
 
+#ifdef VBOX
+    NOREF(la);
+    NOREF(pip);
+#endif
     if (ah->dport == NULL || ah->sport == NULL || ah->lnk == NULL ||
         ah->aaddr == NULL || ah->aport == NULL)
Index: trunk/src/VBox/Devices/Network/slirp/misc.c
===================================================================
--- trunk/src/VBox/Devices/Network/slirp/misc.c	(revision 39091)
+++ trunk/src/VBox/Devices/Network/slirp/misc.c	(revision 39101)
@@ -61,4 +61,5 @@
     register struct quehead *element = (struct quehead *) a;
     register struct quehead *head = (struct quehead *) b;
+    NOREF(pData);
     element->qh_link = head->qh_link;
     head->qh_link = (struct quehead *)element;
@@ -71,4 +72,5 @@
 {
     register struct quehead *element = (struct quehead *) a;
+    NOREF(pData);
     ((struct quehead *)(element->qh_link))->qh_rlink = element->qh_rlink;
     ((struct quehead *)(element->qh_rlink))->qh_link = element->qh_link;
Index: trunk/src/VBox/Devices/Network/slirp/sbuf.c
===================================================================
--- trunk/src/VBox/Devices/Network/slirp/sbuf.c	(revision 39091)
+++ trunk/src/VBox/Devices/Network/slirp/sbuf.c	(revision 39101)
@@ -74,4 +74,5 @@
 sbreserve(PNATState pData, struct sbuf *sb, int size)
 {
+    NOREF(pData);
     if (sb->sb_data)
     {
Index: trunk/src/VBox/Devices/Network/slirp/slirp.c
===================================================================
--- trunk/src/VBox/Devices/Network/slirp/slirp.c	(revision 39091)
+++ trunk/src/VBox/Devices/Network/slirp/slirp.c	(revision 39101)
@@ -273,6 +273,5 @@
 
 #ifdef RT_OS_WINDOWS
-static int get_dns_addr_domain(PNATState pData, bool fVerbose,
-                               struct in_addr *pdns_addr,
+static int get_dns_addr_domain(PNATState pData,
                                const char **ppszDomain)
 {
@@ -421,7 +420,5 @@
 }
 
-static int get_dns_addr_domain(PNATState pData, bool fVerbose,
-                               struct in_addr *pdns_addr,
-                               const char **ppszDomain)
+static int get_dns_addr_domain(PNATState pData, const char **ppszDomain)
 {
     char buff[512];
@@ -553,5 +550,5 @@
     TAILQ_INIT(&pData->pDnsList);
     LIST_INIT(&pData->pDomainList);
-    return get_dns_addr_domain(pData, true, NULL, NULL);
+    return get_dns_addr_domain(pData, NULL);
 }
 
@@ -578,7 +575,7 @@
 }
 
-int get_dns_addr(PNATState pData, struct in_addr *pdns_addr)
-{
-    return get_dns_addr_domain(pData, false, pdns_addr, NULL);
+int get_dns_addr(PNATState pData)
+{
+    return get_dns_addr_domain(pData, NULL);
 }
 
@@ -2192,4 +2189,5 @@
     struct arp_cache_entry *ac;
     struct port_forward_rule *rule;
+    NOREF(pszArgs);
 
     pHlp->pfnPrintf(pHlp, "NAT parameters: MTU=%d\n", if_mtu);
Index: trunk/src/VBox/Devices/Network/slirp/slirp.h
===================================================================
--- trunk/src/VBox/Devices/Network/slirp/slirp.h	(revision 39091)
+++ trunk/src/VBox/Devices/Network/slirp/slirp.h	(revision 39101)
@@ -293,5 +293,5 @@
 #define DEFAULT_BAUD 115200
 
-int get_dns_addr(PNATState pData, struct in_addr *pdns_addr);
+int get_dns_addr(PNATState pData);
 
 /* cksum.c */
Index: trunk/src/VBox/Devices/Network/slirp/socket.c
===================================================================
--- trunk/src/VBox/Devices/Network/slirp/socket.c	(revision 39091)
+++ trunk/src/VBox/Devices/Network/slirp/socket.c	(revision 39101)
@@ -39,5 +39,5 @@
 
 
-static void send_icmp_to_guest(PNATState, char *, size_t, struct socket *, const struct sockaddr_in *);
+static void send_icmp_to_guest(PNATState, char *, size_t, const struct sockaddr_in *);
 #ifdef RT_OS_WINDOWS
 static void sorecvfrom_icmp_win(PNATState, struct socket *);
@@ -1079,8 +1079,10 @@
  * Just write() the data to the socket
  * XXX not yet...
+ * @todo do we really need this function, what it's intended to do?
  */
 void
 sorwakeup(struct socket *so)
 {
+    NOREF(so);
 #if 0
     sowrite(so);
@@ -1097,4 +1099,5 @@
 sowwakeup(struct socket *so)
 {
+    NOREF(so);
 }
 
@@ -1151,4 +1154,5 @@
 soisfdisconnected(struct socket *so)
 {
+    NOREF(so);
 #if 0
     so->so_state &= ~(SS_ISFCONNECTING|SS_ISFCONNECTED);
@@ -1175,5 +1179,5 @@
 
 static void
-send_icmp_to_guest(PNATState pData, char *buff, size_t len, struct socket *so, const struct sockaddr_in *addr)
+send_icmp_to_guest(PNATState pData, char *buff, size_t len, const struct sockaddr_in *addr)
 {
     struct ip *ip;
@@ -1577,5 +1581,5 @@
     }
     /* len is modified in 2nd read, when the rest of the datagramm was read */
-    send_icmp_to_guest(pData, buff, len, so, &addr);
+    send_icmp_to_guest(pData, buff, len, &addr);
     RTMemFree(buff);
 }
Index: trunk/src/VBox/Devices/Network/slirp/tcp_input.c
===================================================================
--- trunk/src/VBox/Devices/Network/slirp/tcp_input.c	(revision 39091)
+++ trunk/src/VBox/Devices/Network/slirp/tcp_input.c	(revision 39101)
@@ -857,6 +857,5 @@
                 goto dropwithreset;
             }
-cont_input:
-            LogFlowFunc(("cont_input:\n"));
+
             tcp_template(tp);
 
Index: trunk/src/VBox/Devices/Network/slirp/tcp_subr.c
===================================================================
--- trunk/src/VBox/Devices/Network/slirp/tcp_subr.c	(revision 39091)
+++ trunk/src/VBox/Devices/Network/slirp/tcp_subr.c	(revision 39101)
@@ -244,5 +244,5 @@
 {
 */
-    LogFlowFunc(("ENTER: tp = %R[tcpcb793], errno = %d\n", tp, errno));
+    LogFlowFunc(("ENTER: tp = %R[tcpcb793], errno = %d\n", tp, err));
 
     if (TCPS_HAVERCVDSYN(tp->t_state))
Index: trunk/src/VBox/Devices/Network/slirp/tftp.c
===================================================================
--- trunk/src/VBox/Devices/Network/slirp/tftp.c	(revision 39091)
+++ trunk/src/VBox/Devices/Network/slirp/tftp.c	(revision 39101)
@@ -390,5 +390,5 @@
 }
 
-static void tftp_handle_ack(PNATState pData, struct tftp_t *tp, int pktlen)
+static void tftp_handle_ack(PNATState pData, struct tftp_t *tp)
 {
     int s;
@@ -416,5 +416,5 @@
 
         case TFTP_ACK:
-            tftp_handle_ack(pData, tp, m->m_len);
+            tftp_handle_ack(pData, tp);
             break;
     }
