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