Commit 7b481d96 authored by mwilliams's avatar mwilliams Committed by facebook-github-bot-1

Fix some warnings in folly

Summary: Remove a couple of unused variables, and move one
that was only used inside an ifdef

Reviewed By: @yfeldblum

Differential Revision: D2279989
parent 30e9f34e
......@@ -41,8 +41,6 @@ FiberManager::~FiberManager() {
loopController_->cancel();
}
Fiber* fiberIt;
Fiber* fiberItNext;
while (!fibersPool_.empty()) {
fibersPool_.pop_front_and_dispose([] (Fiber* fiber) {
delete fiber;
......
......@@ -636,7 +636,6 @@ void AsyncServerSocket::setupSocket(int fd) {
// Get the address family
SocketAddress address;
address.setFromLocalAddress(fd);
auto family = address.getFamily();
// Put the socket in non-blocking mode
if (fcntl(fd, F_SETFL, O_NONBLOCK) != 0) {
......@@ -679,6 +678,7 @@ void AsyncServerSocket::setupSocket(int fd) {
// Set TCP nodelay if available, MAC OS X Hack
// See http://lists.danga.com/pipermail/memcached/2005-March/001240.html
#ifndef TCP_NOPUSH
auto family = address.getFamily();
if (family != AF_UNIX) {
if (setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, &one, sizeof(one)) != 0) {
// This isn't a fatal error; just log an error message and continue
......
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