From: mwilliams Date: Fri, 24 Jul 2015 18:44:20 +0000 (-0700) Subject: Fix some warnings in folly X-Git-Tag: v0.52.0~3 X-Git-Url: http://plrg.eecs.uci.edu/git/?p=folly.git;a=commitdiff_plain;h=7b481d96d66a295cbc18736c7520795813d70289 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 --- diff --git a/folly/experimental/fibers/FiberManager.cpp b/folly/experimental/fibers/FiberManager.cpp index 445b65ad..9f71f3ba 100644 --- a/folly/experimental/fibers/FiberManager.cpp +++ b/folly/experimental/fibers/FiberManager.cpp @@ -41,8 +41,6 @@ FiberManager::~FiberManager() { loopController_->cancel(); } - Fiber* fiberIt; - Fiber* fiberItNext; while (!fibersPool_.empty()) { fibersPool_.pop_front_and_dispose([] (Fiber* fiber) { delete fiber; diff --git a/folly/io/async/AsyncServerSocket.cpp b/folly/io/async/AsyncServerSocket.cpp index b6a28cd0..75e0da30 100644 --- a/folly/io/async/AsyncServerSocket.cpp +++ b/folly/io/async/AsyncServerSocket.cpp @@ -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