Commit 4dfc912b authored by Joe Loser's avatar Joe Loser Committed by Facebook Github Bot

Fix some unused parameters

Summary:
Fix a few unused parameters. One was unconditional; the other two are conditional based on some configuration values set during CMake configure time.
Closes https://github.com/facebook/folly/pull/747

Reviewed By: djwatson

Differential Revision: D6858958

Pulled By: yfeldblum

fbshipit-source-id: acb7fa5a79b9abfdf3dc210f649d0dea8ca4a87a
parent 5a1dec3a
...@@ -97,7 +97,7 @@ int tfo_enable(int sockfd, size_t max_queue_size) { ...@@ -97,7 +97,7 @@ int tfo_enable(int sockfd, size_t max_queue_size) {
sizeof(max_queue_size)); sizeof(max_queue_size));
} }
bool tfo_succeeded(int sockfd) { bool tfo_succeeded(int /* sockfd */) {
errno = EOPNOTSUPP; errno = EOPNOTSUPP;
return false; return false;
} }
......
...@@ -791,6 +791,8 @@ void AsyncServerSocket::setupSocket(int fd, int family) { ...@@ -791,6 +791,8 @@ void AsyncServerSocket::setupSocket(int fd, int family) {
strerror(errno); strerror(errno);
} }
} }
#else
(void)family; // to avoid unused parameter warning
#endif #endif
#if FOLLY_ALLOW_TFO #if FOLLY_ALLOW_TFO
......
...@@ -933,6 +933,7 @@ bool AsyncSocket::isZeroCopyMsg(const cmsghdr& cmsg) const { ...@@ -933,6 +933,7 @@ bool AsyncSocket::isZeroCopyMsg(const cmsghdr& cmsg) const {
(serr->ee_errno == 0) && (serr->ee_origin == SO_EE_ORIGIN_ZEROCOPY)); (serr->ee_errno == 0) && (serr->ee_origin == SO_EE_ORIGIN_ZEROCOPY));
} }
#endif #endif
(void)cmsg;
return false; return false;
} }
...@@ -953,6 +954,8 @@ void AsyncSocket::processZeroCopyMsg(const cmsghdr& cmsg) { ...@@ -953,6 +954,8 @@ void AsyncSocket::processZeroCopyMsg(const cmsghdr& cmsg) {
for (uint32_t i = lo; i <= hi; i++) { for (uint32_t i = lo; i <= hi; i++) {
releaseZeroCopyBuf(i); releaseZeroCopyBuf(i);
} }
#else
(void)cmsg;
#endif #endif
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment