Index: trunk/src/VBox/Devices/Network/slirp/bootp.c
===================================================================
--- trunk/src/VBox/Devices/Network/slirp/bootp.c	(revision 39367)
+++ trunk/src/VBox/Devices/Network/slirp/bootp.c	(revision 39409)
@@ -263,9 +263,5 @@
         rbp->bp_ciaddr.s_addr = bc->addr.s_addr; /* Client IP address */
     }
-#ifndef VBOX_WITH_NAT_SERVICE
     saddr.s_addr = RT_H2N_U32(RT_N2H_U32(pData->special_addr.s_addr) | CTL_ALIAS);
-#else
-    saddr.s_addr = pData->special_addr.s_addr;
-#endif
     Log(("NAT: DHCP: s_addr:%RTnaipv4\n", saddr));
 
@@ -739,9 +735,5 @@
     q += offReply;
 
-#ifndef VBOX_WITH_NAT_SERVICE
     saddr.sin_addr.s_addr = RT_H2N_U32(RT_N2H_U32(pData->special_addr.s_addr) | CTL_ALIAS);
-#else
-    saddr.sin_addr.s_addr = pData->special_addr.s_addr;
-#endif
 
     FILL_BOOTP_EXT(q, RFC2132_SRV_ID, 4, &saddr.sin_addr);
Index: trunk/src/VBox/Devices/Network/slirp/ext.h
===================================================================
--- trunk/src/VBox/Devices/Network/slirp/ext.h	(revision 39367)
+++ trunk/src/VBox/Devices/Network/slirp/ext.h	(revision 39409)
@@ -83,4 +83,7 @@
     vbox_slirp_printV(format, args);
     va_end(args);
+#  else
+    NOREF(format);
+    NOREF(ignored);
 #  endif
 }
Index: trunk/src/VBox/Devices/Network/slirp/ip_icmp.c
===================================================================
--- trunk/src/VBox/Devices/Network/slirp/ip_icmp.c	(revision 39367)
+++ trunk/src/VBox/Devices/Network/slirp/ip_icmp.c	(revision 39409)
@@ -722,4 +722,6 @@
         m_append(pData, m, message_len, message);
     }
+#else
+    NOREF(message);
 #endif
 
Index: trunk/src/VBox/Devices/Network/slirp/ip_output.c
===================================================================
--- trunk/src/VBox/Devices/Network/slirp/ip_output.c	(revision 39367)
+++ trunk/src/VBox/Devices/Network/slirp/ip_output.c	(revision 39409)
@@ -128,5 +128,9 @@
     STAM_PROFILE_START(&pData->StatIP_output, a);
 
+#ifdef LOG_ENABLED
     LogFlowFunc(("ip_output: so = %R[natsock], m0 = %lx\n", so, (long)m0));
+#else
+    NOREF(so);
+#endif
 
     M_ASSERTPKTHDR(m);
Index: trunk/src/VBox/Devices/Network/slirp/misc.c
===================================================================
--- trunk/src/VBox/Devices/Network/slirp/misc.c	(revision 39367)
+++ trunk/src/VBox/Devices/Network/slirp/misc.c	(revision 39409)
@@ -137,4 +137,9 @@
 
     LogFlowFunc(("ENTER: %R[mzone], size:%d, pflags:%p, %RTbool\n", zone, size, pflags, fWait));
+#ifndef LOG_ENABLED
+    NOREF(size);
+    NOREF(pflags);
+    NOREF(fWait);
+#endif
     RTCritSectEnter(&zone->csZone);
     for (;;)
@@ -210,4 +215,8 @@
     struct item *it;
     uma_zone_t zone;
+#ifndef LOG_ENABLED
+    NOREF(size);
+    NOREF(flags);
+#endif
 
     Assert(item);
@@ -241,4 +250,8 @@
 {
     uma_zone_t zone = NULL;
+#ifndef LOG_ENABLED
+    NOREF(flags1);
+    NOREF(flags2);
+#endif
     LogFlowFunc(("ENTER: name:%s size:%d, ctor:%p, dtor:%p, init:%p, fini:%p, flags1:%RX32, flags2:%RX32\n",
                 name, ctor, dtor, init, fini, flags1, flags2));
@@ -328,4 +341,7 @@
     reference counters */
     struct item *it = NULL;
+#ifndef LOG_ENABLED
+    NOREF(zone);
+#endif
     LogFlowFunc(("ENTER: zone:%R[mzone], mem:%p\n", zone, mem));
     it = (struct item *)mem; /* 1st element */
@@ -341,4 +357,7 @@
 {
     void *mem;
+#ifndef LOG_ENABLED
+    NOREF(how);
+#endif
     Assert(zone->magic == ZONE_MAGIC);
     LogFlowFunc(("ENTER: zone:%R[mzone], args:%p, how:%RX32\n", zone, args, how));
@@ -374,4 +393,7 @@
     Assert((mem));
     LogFlowFunc(("ENTER: zone:%R[mzone], mem:%p, flags:%p\n", zone, mem, flags));
+#ifndef LOG_ENABLED
+    NOREF(flags);
+#endif
 
     RTCritSectEnter(&zone->csZone);
@@ -431,4 +453,7 @@
     LogFlowFunc(("ENTER: mem:%p, arg:%p\n", mem, arg));
     Assert(mem);
+#ifndef LOG_ENABLED
+    NOREF(arg);
+#endif
     RTMemFree(mem);
     LogFlowFuncLeave();
@@ -437,4 +462,8 @@
 void *uma_zalloc(uma_zone_t zone, int len)
 {
+#ifndef LOG_ENABLED
+    NOREF(zone);
+    NOREF(len);
+#endif
     LogFlowFunc(("ENTER: zone:%R[mzone], len:%d\n", zone, len));
     LogFlowFunc(("LEAVE: NULL"));
Index: trunk/src/VBox/Devices/Network/slirp/sbuf.c
===================================================================
--- trunk/src/VBox/Devices/Network/slirp/sbuf.c	(revision 39367)
+++ trunk/src/VBox/Devices/Network/slirp/sbuf.c	(revision 39409)
@@ -203,4 +203,7 @@
 {
     int len, n,  nn;
+#ifndef VBOX_WITH_STATISTICS
+    NOREF(pData);
+#endif
 
     len = m_length(m, NULL);
Index: trunk/src/VBox/Devices/Network/slirp/slirp.c
===================================================================
--- trunk/src/VBox/Devices/Network/slirp/slirp.c	(revision 39367)
+++ trunk/src/VBox/Devices/Network/slirp/slirp.c	(revision 39409)
@@ -708,5 +708,8 @@
  *  ipstats(pData); tcpstats(pData); udpstats(pData); icmpstats(pData);
  *  mbufstats(pData); sockstats(pData); */
-#endif /* VBOX_WITH_STATISTICS */
+#else /* VBOX_WITH_STATISTICS */
+    NOREF(pData);
+    NOREF(pDrvIns);
+#endif /* !VBOX_WITH_STATISTICS */
 }
 
@@ -722,5 +725,8 @@
 # define COUNTING_COUNTER(name, dsc)    DEREGISTER_COUNTER(name, pData)
 # include "counters.h"
-#endif /* VBOX_WITH_STATISTICS */
+#else /* VBOX_WITH_STATISTICS */
+    NOREF(pData);
+    NOREF(pDrvIns);
+#endif /* !VBOX_WITH_STATISTICS */
 }
 
@@ -999,8 +1005,4 @@
         so->so_poll_index = -1;
 #endif
-#ifdef VBOX_WITH_NAT_UDP_SOCKET_CLONE
-        if (so->so_cloneOf)
-                CONTINUE_NO_UNLOCK(udp);
-#endif
 
         /*
@@ -1024,4 +1026,8 @@
             }
         }
+#ifdef VBOX_WITH_NAT_UDP_SOCKET_CLONE
+        if (so->so_cloneOf)
+                CONTINUE_NO_UNLOCK(udp);
+#endif
 
         /*
@@ -1484,14 +1490,8 @@
             mr->m_len = sizeof(struct arphdr);
             memcpy(reh->h_source, eh->h_source, ETH_ALEN); /* XXX: if_encap will swap src and dst*/
-            if (   0
-#ifdef VBOX_WITH_NAT_SERVICE
-                || (tip == pData->special_addr.s_addr)
-#endif
-                || (   ((htip & pData->netmask) == RT_N2H_U32(pData->special_addr.s_addr))
-                    && (   CTL_CHECK(htip, CTL_DNS)
-                        || CTL_CHECK(htip, CTL_ALIAS)
-                        || CTL_CHECK(htip, CTL_TFTP))
-                    )
-                )
+            if (   ((htip & pData->netmask) == RT_N2H_U32(pData->special_addr.s_addr))
+                && (   CTL_CHECK(htip, CTL_DNS)
+                    || CTL_CHECK(htip, CTL_ALIAS)
+                    || CTL_CHECK(htip, CTL_TFTP)))
             {
                 rah->ar_hrd = RT_H2N_U16_C(1);
Index: trunk/src/VBox/Devices/Network/slirp/tcp_subr.c
===================================================================
--- trunk/src/VBox/Devices/Network/slirp/tcp_subr.c	(revision 39367)
+++ trunk/src/VBox/Devices/Network/slirp/tcp_subr.c	(revision 39409)
@@ -244,4 +244,7 @@
 {
 */
+#ifndef LOG_ENABLED
+    NOREF(err);
+#endif
     LogFlowFunc(("ENTER: tp = %R[tcpcb793], errno = %d\n", tp, err));
 
