aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2016-10-21 08:04:02 +0200
committerMichael Adam <obnox@samba.org>2016-10-21 09:29:50 +0200
commit86fd744333ddc74d32d301f316ce83e3a2d0c844 (patch)
tree6bcb53022caa6fa5720d006d7710382153efa897 /src
parent46615cd9119e0e66175768e1757c9bc3e15b9cc8 (diff)
downloadsocket_wrapper-86fd744333ddc74d32d301f316ce83e3a2d0c844.tar.gz
socket_wrapper-86fd744333ddc74d32d301f316ce83e3a2d0c844.tar.xz
socket_wrapper-86fd744333ddc74d32d301f316ce83e3a2d0c844.zip
swrap: Mark flags in swrap_accept4 as unused
This removes a compiler warning on non-Linux systems. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
Diffstat (limited to 'src')
-rw-r--r--src/socket_wrapper.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/socket_wrapper.c b/src/socket_wrapper.c
index 72c8868..fb92904 100644
--- a/src/socket_wrapper.c
+++ b/src/socket_wrapper.c
@@ -142,6 +142,8 @@ enum swrap_dbglvl_e {
#define discard_const_p(type, ptr) ((type *)discard_const(ptr))
#endif
+#define UNUSED(x) (void)(x)
+
#ifdef IPV6_PKTINFO
# ifndef IPV6_RECVPKTINFO
# define IPV6_RECVPKTINFO IPV6_PKTINFO
@@ -2884,6 +2886,7 @@ static int swrap_accept(int s,
#ifdef HAVE_ACCEPT4
return libc_accept4(s, addr, addrlen, flags);
#else
+ UNUSED(flags);
return libc_accept(s, addr, addrlen);
#endif
}
@@ -2901,6 +2904,7 @@ static int swrap_accept(int s,
#ifdef HAVE_ACCEPT4
ret = libc_accept4(s, &un_addr.sa.s, &un_addr.sa_socklen, flags);
#else
+ UNUSED(flags);
ret = libc_accept(s, &un_addr.sa.s, &un_addr.sa_socklen);
#endif
if (ret == -1) {